Package de.gsi.dataset
Interface EditConstraints
-
public interface EditConstraintsinterface describing possible constraints on data set modifications- Author:
- rstein
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancanAdd(int index)default booleancanChange(int index)Determines if the specified data point can be modified.booleancanDelete(int index)default booleanisAcceptable(int index, double... newValue)Determines if the specified point can be accepted by the data set.booleanisEditable(int dimIndex)
-
-
-
Method Detail
-
canAdd
boolean canAdd(int index)
- Parameters:
index- data set point index- Returns:
- true: if a new data point can be added at the specified data point.
-
canChange
default boolean canChange(int index)
Determines if the specified data point can be modified.- Parameters:
index- data point index- Returns:
- default is true
-
canDelete
boolean canDelete(int index)
- Parameters:
index- data set point index- Returns:
- true: if the specified data point can be deleted.
-
isAcceptable
default boolean isAcceptable(int index, double... newValue)Determines if the specified point can be accepted by the data set. The specified point may be a new point (in this case index should be -1) or existing point. This method can be used e.g. to make sure that the new point doesn't have the same X coordinate as existing point.- Parameters:
index- index of the point being modified or -1 if it is a new pointnewValue- coordinate list of the considered point- Returns:
trueif the point is acceptable by the data set,falseotherwise
-
isEditable
boolean isEditable(int dimIndex)
- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')- Returns:
- true: if the horizontal values can be modified
-
-