public final class SingleNumericalValue extends NumericalValue
NumericalValue sub-class for representing single integers.BASE_64_CONSTANT_PATTERN, DECIMAL_CONSTANT_PATTERN, HEX_CONSTANT_PATTERN, NUMERICAL_RANGE_PATTERN, SINGLE_CONSTANT_PATTERN| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(int value)
Returns true if the passed integer lies completely inside the interval
represented by this
NumericalValue. |
boolean |
contains(Object value)
Returns true if the passed
Integer or NumericalValue lies
completely inside the interval represented by this NumericalValue . |
static SingleNumericalValue |
create(int value)
Returns a new
SingleNumericalValue with the specified value. |
int |
getValue()
Returns the represented value.
|
static SingleNumericalValue |
parseSingleNumericValue(String value)
Parses a
SingleNumericalValue from a String. |
String |
toString() |
intersect, intersect, parseNumericalValuepublic final int getValue()
public static final SingleNumericalValue create(int value)
SingleNumericalValue with the specified value.value - the value of the returned SingleNumericalValueSingleNumericalValuepublic static final SingleNumericalValue parseSingleNumericValue(String value)
SingleNumericalValue from a String. The
parameter must contain an integer value in decimal, hexadecimal, or
Base64 format. If it does not, null will be returned.value - the String to parseSingleNumericalValue with the parsed value or nullpublic boolean contains(Object value)
NumericalValueInteger or NumericalValue lies
completely inside the interval represented by this NumericalValue . If the parameter is not an
Integer or a NumericalValue,
the method will return false.contains in class NumericalValuevalue - the Integer or NumericalValue to checktrue if the value is complete contained, false if it is notpublic boolean contains(int value)
NumericalValueNumericalValue.contains in class NumericalValuevalue - the integer to checktrue if the value is complete contained, false if it is notCopyright © 2012 University of Konstanz, Distributed Systems Group. All Rights Reserved.