public class NumericRange extends Object
| Constructor and Description |
|---|
NumericRange()
Constructor for NumericRange.
|
NumericRange(int begin)
Initializes the object with a begin index.
|
NumericRange(int[]... indexes)
Initializes the range with the default indexes.
|
NumericRange(int begin,
int end)
Initializes the object with a begin and end index.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(DataValue dataValue)
"Cuts" the given
DataValue based on this NumericRange. |
boolean |
ensureValid(int count)
Tests the bounds are valid values for a collection with the specified length.
|
boolean |
ensureValid(Object value)
Ensures the bounds are valid values for the object passed in.
|
boolean |
equals(Object obj) |
int |
getBegin()
Getter for the field
begin. |
int |
getBegin(int dim)
Get the beginning of the range for the specified dimension.
|
int |
getDimensions()
The number of dimensions in the range.
|
static NumericRange |
getEmpty()
getEmpty.
|
int |
getEnd()
Getter for the field
end. |
int |
getEnd(int dim)
Get the end of the range for the specified dimension.
|
int |
hashCode() |
boolean |
isEmpty()
Checks if the defined range is empty.
|
boolean |
isEmpty(int dim)
Checks if the defined range for the specified dimension is empty.
|
static boolean |
isNullOrEmpty(NumericRange indexRange)
Check if the range is an empty range.
|
static NumericRange |
parse(String textToParse)
Parses a string representing a numeric range.
|
void |
setBegin(int value)
Define the begin index of the range for the first dimension.
|
void |
setBegin(int dim,
int value)
Define the begin index of the range for the specified dimension.
|
void |
setDimensions(int dimensions)
Define the number of dimensions for the NumericRange.
|
void |
setEnd(int value)
Define the end index of the range for the first dimension.
|
void |
setEnd(int dim,
int value)
Define the end index of the range for the specified dimension.
|
String |
toString() |
static String |
toString(NumericRange indexRange)
toString.
|
public NumericRange()
Constructor for NumericRange.
public NumericRange(int begin)
begin - a int.public NumericRange(int begin,
int end)
begin - a int.end - a int.public NumericRange(int[]... indexes)
indexes - the indexes to use for initializing the range. Each element is expected to
define an array of [begin, end] indexes or just [begin].public static NumericRange getEmpty()
getEmpty.
NumericRange object.public static boolean isNullOrEmpty(NumericRange indexRange)
isEmpty() check.indexRange - the range to check.isEmpty()public static NumericRange parse(String textToParse) throws ServiceResultException
textToParse - a String object.ServiceResultException - in case the range is not in proper
formatpublic static String toString(NumericRange indexRange)
toString.
indexRange - a NumericRange object.String object.public void applyTo(DataValue dataValue) throws StatusException
DataValue based on this NumericRange. Throws
Bad_IndexRangeNoData if the range cannot be applied.StatusExceptionpublic boolean ensureValid(int count)
Returns false if the numeric range is out of bounds.
count - a int.public boolean ensureValid(Object value)
Returns false if the object is not indexable or if the numeric range is out of bounds.
value - a Object object.public int getBegin()
Getter for the field begin.
public int getBegin(int dim)
dim - the dimension, minimum 0public int getDimensions()
public int getEnd()
Getter for the field end.
public int getEnd(int dim)
dim - the dimension, minimum 0public boolean isEmpty()
public boolean isEmpty(int dim)
dim - the dimension to checkpublic void setBegin(int value)
value - the begin indexpublic void setBegin(int dim,
int value)
setDimensions(int) must be called first to define the number of dimensions in the
range.dim - the dimension, minimum 0value - the begin indexpublic void setDimensions(int dimensions)
dimensions - the number of dimensions for the range; must be greater than 0public void setEnd(int value)
value - the end indexpublic void setEnd(int dim,
int value)
setDimensions(int) must be called first to define the number of dimensions in the
range.dim - the dimension, minimum 0value - the end indexCopyright © 2026. All rights reserved.