public static class Transliterator.Position extends Object
After a transliteration operation, some of the indices in this structure will be modified. See the field descriptions for details.
contextStart <= start <= limit <= contextLimit
Note: All index values in this structure must be at code point boundaries. That is, none of them may occur between two code units of a surrogate pair. If any index does split a surrogate pair, results are unspecified.
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
int |
contextLimit |
Ending index, exclusive, of the context to be considered for a
transliteration operation.
|
int |
contextStart |
Beginning index, inclusive, of the context to be considered for
a transliteration operation.
|
int |
limit |
Ending index, exclusive, of the text to be transliteratd.
|
int |
start |
Beginning index, inclusive, of the text to be transliteratd.
|
| 构造器 | 说明 |
|---|---|
Position() |
Constructs a Position object with start, limit,
contextStart, and contextLimit all equal to zero.
|
Position(int contextStart,
int contextLimit,
int start) |
Constructs a Position object with the given start,
contextStart, and contextLimit.
|
Position(int contextStart,
int contextLimit,
int start,
int limit) |
Constructs a Position object with the given start, limit,
contextStart, and contextLimit.
|
Position(Transliterator.Position pos) |
Constructs a Position object that is a copy of another.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
equals(Object obj) |
Returns true if this Position is equal to the given object.
|
int |
hashCode() |
Returns a hash code value for the object.
|
void |
set(Transliterator.Position pos) |
Copies the indices of this position from another.
|
String |
toString() |
Returns a string representation of this Position.
|
void |
validate(int length) |
Check all bounds.
|
public int contextLimit
public int contextStart
public int limit
public int start
public Position()
public Position(int contextStart,
int contextLimit,
int start)
public Position(int contextStart,
int contextLimit,
int start,
int limit)
public Position(Transliterator.Position pos)
public void set(Transliterator.Position pos)
public boolean equals(Object obj)
equals 在类中 Objectobj - the reference object with which to compare.true if this object is the same as the obj
argument; false otherwise.Object.hashCode(),
HashMappublic int hashCode()
HashMap.
The general contract of hashCode is:
hashCode method
must consistently return the same integer, provided no information
used in equals comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
equals(Object)
method, then calling the hashCode method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hash tables.
As much as is reasonably practical, the hashCode method defined by
class Object does return distinct integers for distinct
objects. (This is typically implemented by converting the internal
address of the object into an integer, but this implementation
technique is not required by the
Java™ programming language.)
hashCode 在类中 ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public String toString()
public final void validate(int length)
length - the length of the string this object applies toIllegalArgumentException - if any indices are out
of bounds