|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.schema.Range
Represents a numeric range constraint attached to a SimpleType
min and max properties are stored as double since all less specific base numeric data types constraints can be derived from it. Convenience methods are supplied to retrieve min and max as; double, int, short, float and long.
A range may be inclusive or exclusive. Both ends of the range must be inclusive or exclusive. It is not possible to have an inclusive lower bound and exclusive upper bound as the same effect can be achieved by simply altering either bound by a value of one.
SimpleType
,
Serialized FormField Summary | |
private boolean |
isExclusive
|
private boolean |
isInclusive
|
private Double |
max
|
private Double |
min
|
Constructor Summary | |
Range()
Create a new inclusive range with min and max of zero. |
|
Range(double min,
double max)
Create a new inclusive range with values of min and max. |
Method Summary | |
double |
doubleMax()
Get the max property as a double |
double |
doubleMin()
Get the min property as a double |
float |
floatMax()
Get the max property as a float |
float |
floatMin()
Get the min property as a float |
boolean |
getIsExclusive()
Get the isExclusive property value |
boolean |
getIsInclusive()
Get the isInclusive property value |
double |
getMax()
Get the max property value |
double |
getMin()
Get the min property value |
int |
intMax()
Get the max property as an int |
int |
intMin()
Get the min property as an int |
boolean |
isExclusive()
Get the isExclusive property value |
boolean |
isInclusive()
Get the isInclusive property value |
long |
longMax()
Get the max property as a long |
long |
longMin()
Get the min property as a long |
void |
setIsExclusive(boolean b)
Set the isExclusive property value. |
void |
setIsInclusive(boolean b)
Set the isInclusive property value. |
void |
setMax(double d)
Set the max property |
void |
setMin(double d)
Set the min property |
short |
shortMax()
Get the max property as a short |
short |
shortMin()
Get the min property as a short |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Double min
private Double max
private boolean isInclusive
private boolean isExclusive
Constructor Detail |
public Range()
public Range(double min, double max)
Method Detail |
public void setMin(double d)
d
- the new property valuepublic double getMin()
public void setMax(double d)
d
- the new property valuepublic double getMax()
public void setIsInclusive(boolean b)
b
- the new property valuepublic boolean getIsInclusive()
public boolean isInclusive()
public void setIsExclusive(boolean b)
b
- the new property valuepublic boolean getIsExclusive()
public boolean isExclusive()
public double doubleMin()
public double doubleMax()
public int intMin()
public int intMax()
public float floatMin()
public float floatMax()
public short shortMin()
public short shortMax()
public long longMin()
public long longMax()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |