All Packages Class Hierarchy This Package Previous Next Index
Class semper.preferences.IntegerStringConstraints
java.lang.Object
|
+----semper.preferences.IntegerStringConstraints
- public class IntegerStringConstraints
- extends Object
- implements StringConstraints
This is used when a PrefFieldString is used to represent a Integer
value. It is possible to define a lower and an upper bound between
which the integer value must be.
- Version:
- $Revision: 1.7 $ $Date: 1997/09/26 16:29:24 $
- Author:
- Louis Salvail
- See Also:
- PrefFieldString
-
_lowerBound
-
-
_upperBound
-
-
IntegerStringConstraints()
-
Constructor for an integer whithout other constraints.
-
IntegerStringConstraints(int, int)
-
Contructor for integer constraints between two values.
-
convert(String)
-
Returns the integer encoded in the input string.
-
isSatisfied(String)
-
Indicates if a string encodes an integer between the bounds.
-
showInfo(Frame, String)
-
Display a window with the bound for that integer.
_lowerBound
public int _lowerBound
_upperBound
public int _upperBound
IntegerStringConstraints
public IntegerStringConstraints()
- Constructor for an integer whithout other constraints.
- Returns:
- the new constraints object for an arbitrarily integer.
- See Also:
- Integer
IntegerStringConstraints
public IntegerStringConstraints(int lowBound,
int upBound)
- Contructor for integer constraints between two values.
- Parameters:
- lowBound - is the lower bound for the integer value.
- upBound - is the upper bound for the integer value.
- Returns:
- the new object.
- See Also:
- Integer
isSatisfied
public boolean isSatisfied(String s)
- Indicates if a string encodes an integer between the bounds. If no bound
has been defined, true is returned given the string encodes an Integer.
- Parameters:
- s - the string to test.
- Returns:
- true if and only if the string represents an Integer
number between the two selected bound.
- See Also:
- Integer
convert
public Object convert(String s) throws StringConversionException
- Returns the integer encoded in the input string.
- Parameters:
- s - is the string to convert.
- Returns:
- the Integer encoded in the string.
- Throws: StringConversionException
- if the string could not be converted.
showInfo
public void showInfo(Frame parent,
String fieldName)
- Display a window with the bound for that integer.
- Parameters:
- parent - is the parent frame.
- fieldName - is the name of the field.
- Returns:
- none.
All Packages Class Hierarchy This Package Previous Next Index