public class ListSpaceDimension extends SpaceDimension
| Constructor and Description |
|---|
ListSpaceDimension(int min,
int max,
String[] list,
String label)
initializes the dimension (for list values).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Tests itself against the provided dimension object.
|
String[] |
getList()
Returns the list of values, null in case of a numeric dimension that
is based on a mathematical function.
|
int |
getLocation(Object value)
returns the closest index for the given value in the dimension.
|
Object |
getValue(int x)
returns the value at the given point in the dimension.
|
ListSpaceDimension |
subdimension(int left,
int right)
returns a sub-dimension with the same type/step/list, but different borders.
|
String |
toString()
Returns a string representation of the dimension.
|
getLabel, getMax, getMin, getStep, isOnBorder, isOnBorder, widthpublic ListSpaceDimension(int min,
int max,
String[] list,
String label)
min - the minimum index in the list (0-based index)max - the maximum index in the list (0-based index)list - the available valueslabel - the label for the axispublic boolean equals(Object o)
equals in class SpaceDimensiono - the dimension object to compare againstpublic String[] getList()
public Object getValue(int x)
getValue in class SpaceDimensionx - the x-th point on the axispublic int getLocation(Object value)
getLocation in class SpaceDimensionvalue - the value to get the index forpublic ListSpaceDimension subdimension(int left, int right)
subdimension in class SpaceDimensionleft - the left indexright - the right indexpublic String toString()
toString in class SpaceDimensionCopyright © 2021 University of Waikato, Hamilton, NZ. All Rights Reserved.