public static final class DictionaryAlgorithms.WordPosition extends LineSegment implements Comparable<DictionaryAlgorithms.WordPosition>
Modifier and Type | Field and Description |
---|---|
String |
s
The string this word position refers to.
|
begin, end
Constructor and Description |
---|
DictionaryAlgorithms.WordPosition(int begin,
int end)
Constructor of the WordPosition class.
|
DictionaryAlgorithms.WordPosition(String s,
int begin,
int end)
Constructor of the WordPosition class.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DictionaryAlgorithms.WordPosition o) |
boolean |
equals(Object obj)
Two WordPosition instances equal if they point to the same string and
have the same begin and end.
|
String |
getWord()
Returns the word this WordPosition refers to.
|
int |
hashCode()
Returns the hash code which is constructed from the begin, the end
position and the hash code of the string this name refers to.
|
boundariesEqual, boundariesEqual, getBegin, getEnd, intersection, isValid, isValid, length, length, normalize, normalize, normalizedBounds, overlaps, overlaps, setBegin, setEnd, union
public final String s
public DictionaryAlgorithms.WordPosition(String s, int begin, int end)
s
- is string this word position refers to.begin
- is the start character of the word.end
- is the end character of the word.public DictionaryAlgorithms.WordPosition(int begin, int end)
begin
- is the start character of the word.end
- is the end character of the word.public String getWord()
public boolean equals(Object obj)
public int hashCode()
public int compareTo(DictionaryAlgorithms.WordPosition o)
compareTo
in interface Comparable<DictionaryAlgorithms.WordPosition>
Copyright (C) 2013, 2014 Raphael Dickfelder, Jan Göpfert, Benjamin Paassen, Andreas Stöckel, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/scie