public class NumberInterval<T extends Number>
A potentially open numeric range. If both min and max are null, then the interval accepts any number.
| Constructor and Description |
|---|
NumberInterval(T min,
T max)
A potentially open numeric range. If both min and max are
null, then the interval accepts any number. |
| Modifier and Type | Method and Description |
|---|---|
T |
component1()
the minimum accepted value,
|
T |
component2()
the maximum accepted value,
|
NumberInterval<T> |
copy(T min,
T max)
A potentially open numeric range. If both min and max are
null, then the interval accepts any number. |
boolean |
equals(java.lang.Object p) |
T |
getMax()
the maximum accepted value,
|
T |
getMin()
the minimum accepted value,
|
int |
hashCode() |
boolean |
isSingleItem()
True if the interval consists of single number only.
|
boolean |
isUniversalSet()
|
void |
setMax(T p)
the maximum accepted value,
|
void |
setMin(T p)
the minimum accepted value,
|
<F> F |
toFilter(java.lang.String propertyName,
eu.vaadinonkotlin.FilterFactory<F> filterFactory)
Creates a filter out of this interval, using given filterFactory.
|
java.lang.String |
toString() |
public NumberInterval(T min,
T max)
A potentially open numeric range. If both min and max are null, then the interval accepts any number.
min - the minimum accepted value, inclusive. If null then the numeric range has no lower limit.max - the maximum accepted value, inclusive. If null then the numeric range has no upper limit.public <F> F toFilter(java.lang.String propertyName,
eu.vaadinonkotlin.FilterFactory<F> filterFactory)
Creates a filter out of this interval, using given filterFactory.
null for universal set interval.public boolean isSingleItem()
True if the interval consists of single number only.
public T getMin()
the minimum accepted value,
inclusive. If null then the numeric range has no lower limit.
public void setMin(T p)
the minimum accepted value,
inclusive. If null then the numeric range has no lower limit.
p - the minimum accepted value, inclusive. If null then the numeric range has no lower limit.public T getMax()
the maximum accepted value,
inclusive. If null then the numeric range has no upper limit.
public void setMax(T p)
the maximum accepted value,
inclusive. If null then the numeric range has no upper limit.
p - the maximum accepted value, inclusive. If null then the numeric range has no upper limit.public T component1()
the minimum accepted value,
inclusive. If null then the numeric range has no lower limit.
public T component2()
the maximum accepted value,
inclusive. If null then the numeric range has no upper limit.
public NumberInterval<T> copy(T min, T max)
A potentially open numeric range. If both min and max are null, then the interval accepts any number.
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)