public abstract class StringExpression
extends java.lang.Object
StringExpression
is an
javafx.beans.value.ObservableStringValue
plus additional convenience
methods to generate bindings in a fluent style.
A concrete sub-class of StringExpression
has to implement the method
javafx.beans.value.ObservableStringValue#get()
, which provides the
actual value of this expression.
Note: all implementation of BooleanBinding
returned by the comparisons in this class consider a String
that is
null
equal to an empty String
.
Constructor and Description |
---|
StringExpression() |
Modifier and Type | Method and Description |
---|---|
StringExpression |
concat(java.lang.Object other)
Returns a
StringExpression that holds the value of this
StringExpression concatenated with another Object . |
java.lang.String |
getValue() |
java.lang.String |
getValueSafe()
Returns usually the value of this
StringExpression . |
BooleanBinding |
greaterThan(ObservableStringValue other)
Creates a new
BooleanBinding that holds true
if this StringExpression is greater than another
javafx.beans.value.ObservableStringValue . |
BooleanBinding |
greaterThanOrEqualTo(ObservableStringValue other)
Creates a new
BooleanBinding that holds true
if this StringExpression is greater than or equal to another
javafx.beans.value.ObservableStringValue . |
BooleanBinding |
isEmpty()
|
BooleanBinding |
isEqualTo(ObservableStringValue other)
Creates a new
BooleanBinding that holds true
if this and another javafx.beans.value.ObservableStringValue are
equal. |
BooleanBinding |
isEqualToIgnoreCase(ObservableStringValue other)
Creates a new
BooleanBinding that holds true
if this and another javafx.beans.value.ObservableStringValue are
equal ignoring case. |
BooleanBinding |
isNotEmpty()
|
BooleanBinding |
isNotEqualTo(ObservableStringValue other)
Creates a new
BooleanBinding that holds true
if this and another javafx.beans.value.ObservableStringValue are
not equal. |
BooleanBinding |
isNotEqualToIgnoreCase(ObservableStringValue other)
Creates a new
BooleanBinding that holds true
if this and another javafx.beans.value.ObservableStringValue are
not equal ignoring case. |
BooleanBinding |
isNotNull()
|
BooleanBinding |
isNull()
|
IntegerBinding |
length()
Creates a new
IntegerBinding that holds the length of this
StringExpression . |
BooleanBinding |
lessThan(ObservableStringValue other)
Creates a new
BooleanBinding that holds true
if this StringExpression is less than another
javafx.beans.value.ObservableStringValue . |
BooleanBinding |
lessThanOrEqualTo(ObservableStringValue other)
Creates a new
BooleanBinding that holds true
if this StringExpression is less than or equal to another
javafx.beans.value.ObservableStringValue . |
static StringExpression |
stringExpression(<any> value)
Returns a
StringExpression that wraps a
javafx.beans.value.ObservableValue . |
public java.lang.String getValue()
public final java.lang.String getValueSafe()
StringExpression
. Only if the
value is null
an empty String
is returned instead.StringExpression
or the empty
String
public static StringExpression stringExpression(<any> value)
StringExpression
that wraps a
javafx.beans.value.ObservableValue
. If the
ObservableValue
is already a StringExpression
, it will be
returned. Otherwise a new StringBinding
is
created that holds the value of the ObservableValue
converted to
a String
.value
- The source ObservableValue
StringExpression
that wraps the ObservableValue
if necessaryjava.lang.NullPointerException
- if value
is null
public StringExpression concat(java.lang.Object other)
StringExpression
that holds the value of this
StringExpression
concatenated with another Object
.
If the value of this StringExpression
changes, the value of the
resulting StringExpression
is updated automatically. Also if the
other Object
is an implementation of
javafx.beans.value.ObservableValue
, changes in the other
Object
are reflected automatically in the resulting
StringExpression
.
other
- the other Object
StringExpression
public BooleanBinding isEqualTo(ObservableStringValue other)
BooleanBinding
that holds true
if this and another javafx.beans.value.ObservableStringValue
are
equal.
Note: In this comparison a String
that is null
is
considered equal to an empty String
.
other
- the constant valueBooleanBinding
public BooleanBinding isNotEqualTo(ObservableStringValue other)
BooleanBinding
that holds true
if this and another javafx.beans.value.ObservableStringValue
are
not equal.
Note: In this comparison a String
that is null
is
considered equal to an empty String
.
other
- the constant valueBooleanBinding
public BooleanBinding isEqualToIgnoreCase(ObservableStringValue other)
BooleanBinding
that holds true
if this and another javafx.beans.value.ObservableStringValue
are
equal ignoring case.
Note: In this comparison a String
that is null
is
considered equal to an empty String
.
other
- the second ObservableStringValue
BooleanBinding
public BooleanBinding isNotEqualToIgnoreCase(ObservableStringValue other)
BooleanBinding
that holds true
if this and another javafx.beans.value.ObservableStringValue
are
not equal ignoring case.
Note: In this comparison a String
that is null
is
considered equal to an empty String
.
other
- the second ObservableStringValue
BooleanBinding
public BooleanBinding greaterThan(ObservableStringValue other)
BooleanBinding
that holds true
if this StringExpression
is greater than another
javafx.beans.value.ObservableStringValue
.
Note: In this comparison a String
that is null
is
considered equal to an empty String
.
other
- the second ObservableStringValue
BooleanBinding
public BooleanBinding lessThan(ObservableStringValue other)
BooleanBinding
that holds true
if this StringExpression
is less than another
javafx.beans.value.ObservableStringValue
.
Note: In this comparison a String
that is null
is
considered equal to an empty String
.
other
- the second ObservableStringValue
BooleanBinding
public BooleanBinding greaterThanOrEqualTo(ObservableStringValue other)
BooleanBinding
that holds true
if this StringExpression
is greater than or equal to another
javafx.beans.value.ObservableStringValue
.
Note: In this comparison a String
that is null
is
considered equal to an empty String
.
other
- the second ObservableStringValue
BooleanBinding
public BooleanBinding lessThanOrEqualTo(ObservableStringValue other)
BooleanBinding
that holds true
if this StringExpression
is less than or equal to another
javafx.beans.value.ObservableStringValue
.
Note: In this comparison a String
that is null
is
considered equal to an empty String
.
other
- the second ObservableStringValue
BooleanBinding
public BooleanBinding isNull()
BooleanBinding
public BooleanBinding isNotNull()
BooleanBinding
public IntegerBinding length()
IntegerBinding
that holds the length of this
StringExpression
.
Note: If the value of this StringExpression
is null
,
the length is considered to be 0
.
IntegerBinding
public BooleanBinding isEmpty()
BooleanBinding
that holds true
if this
StringExpression
is empty.
Note: If the value of this StringExpression
is null
,
it is considered to be empty.
BooleanBinding
public BooleanBinding isNotEmpty()
BooleanBinding
that holds true
if this
StringExpression
is not empty.
Note: If the value of this StringExpression
is null
,
it is considered to be empty.
BooleanBinding