public class GIntervalList extends Object
| Constructor and Description |
|---|
GIntervalList()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(GIntervalAbstract interval)
Adds a validity interval to the list.
|
GIntervalAbstract |
get(int index)
Get the interval of a given index in the list.
|
String |
getMessage()
Return the error message associated with the last value checked, if the value is OK then the message is
empty.
|
boolean |
isEmpty()
Check if the interval list is empty.
|
void |
remove(GIntervalAbstract interval)
Removes a validity interval of the list.
|
GIntervalAbstract.GStatus |
testRange(Object object)
Checks if the value is contained in any of the intervals.
|
void |
update(GIntervalAbstract oldInterval,
GIntervalAbstract newInterval)
Update an validity interval of the list.
|
void |
updateMessage(GUnit currentUnit,
GIntervalFormatAbstract formatter)
Update the interval message using the unit, and format provided.
|
public GIntervalList()
public void add(GIntervalAbstract interval) throws GIntervalException
interval - to be added.GIntervalException - If the new interval overlaps with an existing interval in the list.public void remove(GIntervalAbstract interval)
interval - to be removed.public GIntervalAbstract get(int index)
index - of the wanted interval in the intervals list.public void update(GIntervalAbstract oldInterval, GIntervalAbstract newInterval) throws GIntervalException
oldInterval - to be updated.newInterval - to update oldInterval.GIntervalException - in case the interval to replace does not exist, the interval list is not modified.public GIntervalAbstract.GStatus testRange(Object object)
object - to test.public String getMessage()
public void updateMessage(GUnit currentUnit, GIntervalFormatAbstract formatter)
currentUnit - the unit to use to convert the interval limits.formatter - Necessary data to format the message (normal/scientific format and fractional digits)public boolean isEmpty()
Copyright © 2024. All rights reserved.