- java.lang.Object
- 
- javafx.scene.control.IndexRange
 
- 
 
 public final class IndexRange extends Object Class representing a contiguous range of integral values.- Since:
- JavaFX 2.0
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringVALUE_DELIMITERIndex range value delimiter.
 - 
Constructor SummaryConstructors Constructor Description IndexRange(int start, int end)Creates an instance of IndexRange representing the range betweenstartandend.IndexRange(IndexRange range)Creates an instance of IndexRange by copying the values from the given IndexRange object.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Indicates whether some other object is "equal to" this one.intgetEnd()Returns the end position of the range (exclusive).intgetLength()Returns the length of the range.intgetStart()Returns the start position of the range.inthashCode()Returns a hash code for thisRangeobject.static IndexRangenormalize(int v1, int v2)Convenience method to create an IndexRange instance that has the smaller value as the start index, and the larger value as the end index.StringtoString()Returns a string representation of thisRangeobject.static IndexRangevalueOf(String value)Convenience method to parse in a String of the form '2,6', which will create an IndexRange instance with a start value of 2, and an end value of 6.
 
- 
- 
- 
Field Detail- 
VALUE_DELIMITERpublic static final String VALUE_DELIMITER Index range value delimiter.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
IndexRangepublic IndexRange(int start, int end)Creates an instance of IndexRange representing the range betweenstartandend.- Parameters:
- start- The start position of the range.
- end- The end position of the range.
 
 - 
IndexRangepublic IndexRange(IndexRange range) Creates an instance of IndexRange by copying the values from the given IndexRange object.- Parameters:
- range- The IndexRange instance from which to copy the start and end values.
 
 
- 
 - 
Method Detail- 
getStartpublic int getStart() Returns the start position of the range.- Returns:
- the start position of the range
 
 - 
getEndpublic int getEnd() Returns the end position of the range (exclusive).- Returns:
- the end position of the range (exclusive)
 
 - 
getLengthpublic int getLength() Returns the length of the range.- Returns:
- the length of the range
 
 - 
equalspublic boolean equals(Object object) Indicates whether some other object is "equal to" this one.- Overrides:
- equalsin class- Object
- Parameters:
- object- the reference object with which to compare.
- Returns:
- trueif this object is equal to the- objectargument;- falseotherwise.
- See Also:
- Object.hashCode(),- HashMap
 
 - 
hashCodepublic int hashCode() Returns a hash code for thisRangeobject.- Overrides:
- hashCodein class- Object
- Returns:
- a hash code for this Rangeobject.
- See Also:
- Object.equals(java.lang.Object),- System.identityHashCode(java.lang.Object)
 
 - 
toStringpublic String toString() Returns a string representation of thisRangeobject.
 - 
normalizepublic static IndexRange normalize(int v1, int v2) Convenience method to create an IndexRange instance that has the smaller value as the start index, and the larger value as the end index.- Parameters:
- v1- The first value to use in the range.
- v2- The second value to use in the range.
- Returns:
- A IndexRange instance where the smaller value is the start, and the larger value is the end.
 
 - 
valueOfpublic static IndexRange valueOf(String value) Convenience method to parse in a String of the form '2,6', which will create an IndexRange instance with a start value of 2, and an end value of 6.- Parameters:
- value- The string to be parsed, and converted to an IndexRange.
- Returns:
- An IndexRange instance representing the start and end values provided in the value string.
 
 
- 
 
-