com.starbase.starteam
Class HistoryKeyword

java.lang.Object
  |
  +--com.starbase.starteam.SimpleKeyword
        |
        +--com.starbase.starteam.HistoryKeyword
All Implemented Interfaces:
Keyword

public class HistoryKeyword
extends SimpleKeyword


Constructor Summary
HistoryKeyword(HistoryLine historyLine)
          Constructs a $History$ keyword using the specified history entries.
 
Method Summary
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 java.lang.String expand(java.lang.String linePrefix, java.lang.String eol, boolean expand)
          Expands or unexpands the $Log$ keyword.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean matches(java.lang.String line, int start, int[] endPos)
          Returns true of this keyword is found in the specified line.
 boolean multiLine()
          Always returns true.
 java.lang.String toXMLString()
          Returns an XML representation of the keyword.
 
Methods inherited from class com.starbase.starteam.SimpleKeyword
getName, getValue, stopExpanding
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryKeyword

public HistoryKeyword(HistoryLine historyLine)
Constructs a $History$ keyword using the specified history entries.

Method Detail

multiLine

public boolean multiLine()
Always returns true.

Specified by:
multiLine in interface Keyword
Overrides:
multiLine in class SimpleKeyword
Returns:
true always

expand

public java.lang.String expand(java.lang.String linePrefix,
                               java.lang.String eol,
                               boolean expand)
Expands or unexpands the $Log$ keyword. The linePrefix is used because $Log$ spans multiple lines and the prefix may have been a source code comment character(s) that are needed on each line. The end-of-line is also needed to terminate the individual lines.

Specified by:
expand in interface Keyword
Overrides:
expand in class SimpleKeyword
Parameters:
linePrefix - the begining of the line in the souce leading up to the keyword
eol - the end-of-line convention used in the source file
expand - true if the keyword is to be expanded and false for unexpand
Returns:
the expanded or unexpanded $Log$ keyword.

matches

public boolean matches(java.lang.String line,
                       int start,
                       int[] endPos)
Returns true of this keyword is found in the specified line. If found then the endPos parameter is treated as an output parameter and the value of endPos[0] should be the position in the line where the ending $ occurs.

Specified by:
matches in interface Keyword
Overrides:
matches in class SimpleKeyword
Parameters:
line - the line to search for this keyword
start - the position in the line (zero based) to start searching
endPos - and "output" array where the end of the keyword occurs.
Returns:
true if the keyword is found on the specified line

toXMLString

public java.lang.String toXMLString()
Returns an XML representation of the keyword. The default XML representation for a LogKeyword is of the form:
 <logkeyword>...log lines...</logkeyword>
 

Specified by:
toXMLString in interface Keyword
Overrides:
toXMLString in class SimpleKeyword
Returns:
an XML representation of the keyword.
See Also:
LogLine.toXMLString()

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class SimpleKeyword
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class SimpleKeyword
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.0, Build 58
Copyright © 2003-2004 Borland Software Corporation. All rights reserved.