APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.control

public final Class IndexRange

extends Object
Class Inheritance
Imports
javafx.beans.NamedArg

Class representing a contiguous range of integral values.
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private int
private int
public static final String
VALUE_DELIMITER

Index range value delimiter.

Constructor Summary

AccessConstructor and Description
public
IndexRange(int
The start position of the range.
start
,
int
The end position of the range.
end
)

Creates an instance of IndexRange representing the range between start and end.

public
IndexRange(IndexRange
The IndexRange instance from which to copy the start and end values.
range
)

Creates an instance of IndexRange by copying the values from the given IndexRange object.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this object is equal to the object argument; false otherwise.
equals
(Object
the reference object with which to compare.
object
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public int

Returns:

the end position of the range (exclusive)
getEnd
()

Returns the end position of the range (exclusive).

public int

Returns:

the length of the range
getLength
()

Returns the length of the range.

public int

Returns:

the start position of the range
getStart
()

Returns the start position of the range.

public int

Returns:

a hash code for this Range object.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code for this Range object.

public static IndexRange

Returns:

A IndexRange instance where the smaller value is the start, and the larger value is the end.
normalize
(int
The first value to use in the range.
v1
,
int
The second value to use in the range.
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.

public String

Returns:

a string representation of this Range object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this Range object.

public static IndexRange

Returns:

An IndexRange instance representing the start and end values provided in the value string.
valueOf
(String
The string to be parsed, and converted to an IndexRange.
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.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

endback to summary
private int end
startback to summary
private int start
VALUE_DELIMITERback to summary
public static final String VALUE_DELIMITER

Index range value delimiter.

Constructor Detail

IndexRangeback to summary
public IndexRange(int start, int end)

Creates an instance of IndexRange representing the range between start and end.

Parameters
start:int

The start position of the range.

end:int

The end position of the range.

IndexRangeback to summary
public IndexRange(IndexRange range)

Creates an instance of IndexRange by copying the values from the given IndexRange object.

Parameters
range:IndexRange

The IndexRange instance from which to copy the start and end values.

Method Detail

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

Parameters
object:Object

the reference object with which to compare.

Returns:boolean

true if this object is equal to the object argument; false otherwise.

Annotations
@Override
getEndback to summary
public int getEnd()

Returns the end position of the range (exclusive).

Returns:int

the end position of the range (exclusive)

getLengthback to summary
public int getLength()

Returns the length of the range.

Returns:int

the length of the range

getStartback to summary
public int getStart()

Returns the start position of the range.

Returns:int

the start position of the range

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code for this Range object.

Returns:int

a hash code for this Range object.

Annotations
@Override
normalizeback to summary
public 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:int

The first value to use in the range.

v2:int

The second value to use in the range.

Returns:IndexRange

A IndexRange instance where the smaller value is the start, and the larger value is the end.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this Range object.

Returns:String

a string representation of this Range object.

Annotations
@Override
valueOfback to summary
public 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:String

The string to be parsed, and converted to an IndexRange.

Returns:IndexRange

An IndexRange instance representing the start and end values provided in the value string.