Package org.fxmisc.richtext.model
Enum TwoDimensional.Bias
- java.lang.Object
-
- java.lang.Enum<TwoDimensional.Bias>
-
- org.fxmisc.richtext.model.TwoDimensional.Bias
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TwoDimensional.Bias>
- Enclosing interface:
- TwoDimensional
public static enum TwoDimensional.Bias extends java.lang.Enum<TwoDimensional.Bias>
Determines whether to add 1 when the end of an inner list is reachedFor example, given the following two dimensional object (a list of lists of objects) where the inner lists values show the absolute index of that specific item within the outer list...
...navigating to[ // outer list [0, 1, 2, 3], // inner list 1 [4, 5, 6] // inner list 2 ] // outer list
listOfListsObject.offsetTo(3, BACKWARD)
will return3
whereaslistOfListsObject.offsetTo(3, FORWARD)
will return4
, the "next item" in the two dimensional object. The Bias does not apply if the index is any non-last-index in the inner list. Thus,listOfListsObject.offsetTo(1, BACKWARD)
andlistOfListsObject.offsetTo(1, FORWARD)
will return the same value,1
, since the position is not at the end of the list.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Backward
When the returned value would be equal to the last index in an "inner list" or the length of some object with length, returns the value unmodified.Forward
When the returned value would be equal to the last index in an "inner list" or the length of some object with length, returns thevalue + 1
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TwoDimensional.Bias
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TwoDimensional.Bias[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Forward
public static final TwoDimensional.Bias Forward
When the returned value would be equal to the last index in an "inner list" or the length of some object with length, returns thevalue + 1
. SeeTwoDimensional.Bias
for more clarification.
-
Backward
public static final TwoDimensional.Bias Backward
When the returned value would be equal to the last index in an "inner list" or the length of some object with length, returns the value unmodified. SeeTwoDimensional.Bias
for more clarification.
-
-
Method Detail
-
values
public static TwoDimensional.Bias[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TwoDimensional.Bias c : TwoDimensional.Bias.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TwoDimensional.Bias valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-