Constructor and Description |
---|
Hit()
Creates a new instance of Hit
|
Hit(java.lang.String filename,
java.lang.String line,
java.lang.String lineno,
boolean binary,
boolean alt)
Creates a new instance of Hit
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Hit o)
Compare this object to another hit (in order to implement the comparable
interface)
|
boolean |
equals(java.lang.Object o)
Check if two objects are equal.
|
boolean |
getAlt()
Should this be alternate file?
|
java.lang.String |
getDirectory()
Getter for property directory
|
java.lang.String |
getFilename()
Getter for property filename.
|
java.lang.String |
getLine()
Getter for property line.
|
java.lang.String |
getLineno()
Getter for property lineno.
|
java.lang.String |
getPath()
Getter for property path.
|
java.lang.String |
getTag()
Getter for property tag.
|
int |
hashCode() |
boolean |
isBinary()
Getter for property binary.
|
void |
setBinary(boolean binary)
Setter for property binary.
|
void |
setFilename(java.lang.String filename)
Setter for property filename.
|
void |
setLine(java.lang.String line)
Setter for property line.
|
void |
setLineno(java.lang.String lineno)
Setter for property lineno.
|
void |
setTag(java.lang.String tag)
Setter for property tag.
|
public Hit()
public Hit(java.lang.String filename, java.lang.String line, java.lang.String lineno, boolean binary, boolean alt)
filename
- The name of the file this hit representsline
- The line containing the matchlineno
- The line number in the file the match was foundbinary
- If this is a binary file or notalt
- Is this the "alternate" filepublic java.lang.String getFilename()
public java.lang.String getPath()
public java.lang.String getDirectory()
public void setFilename(java.lang.String filename)
filename
- New value of property filename.public java.lang.String getLine()
public void setLine(java.lang.String line)
line
- New value of property line.public java.lang.String getLineno()
public void setLineno(java.lang.String lineno)
lineno
- New value of property lineno.public int compareTo(Hit o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable<Hit>
o
- The object to compare this object withjava.lang.ClassCastException
public boolean isBinary()
public void setBinary(boolean binary)
binary
- New value of property binary.public java.lang.String getTag()
public void setTag(java.lang.String tag)
tag
- New value of property tag.public boolean getAlt()
public boolean equals(java.lang.Object o)
filename
field
to match the return value of the compareTo(Hit)
method.equals
in class java.lang.Object
o
- the object to compare withpublic int hashCode()
hashCode
in class java.lang.Object