Top Description Constructors Methods
javafx.beans.binding

public abstract Class StringExpression

extends Object
implements ObservableStringValue
Class Inheritance
All Implemented Interfaces
javafx.beans.value.ObservableStringValue, javafx.beans.value.ObservableObjectValue, javafx.beans.value.ObservableValue, javafx.beans.Observable
Known Direct Subclasses
javafx.beans.property.ReadOnlyStringProperty, com.sun.javafx.binding.StringConstant, javafx.beans.binding.StringBinding
Imports
javafx.beans.value.ObservableStringValue, .ObservableValue, com.sun.javafx.binding.StringFormatter

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 javafx.beans.binding.BooleanBinding returned by the comparisons in this class consider a String that is null equal to an empty String.

Since
JavaFX 2.0

Constructor Summary

AccessConstructor and Description
public
StringExpression()

Creates a default StringExpression.

Method Summary

Modifier and TypeMethod and Description
public StringExpression

Returns:

the new StringExpression
concat
(Object
the other Object
other
)

Returns a StringExpression that holds the value of this StringExpression concatenated with another Object.

public String
getValue()

Implements javafx.beans.value.ObservableValue.getValue.

Returns the current value of this ObservableValue

public final String

Returns:

the value of this StringExpression or the empty String
getValueSafe
()

Returns usually the value of this StringExpression.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThan
(final ObservableStringValue
the second ObservableStringValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is greater than another javafx.beans.value.ObservableStringValue.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThan
(final String
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is greater than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThanOrEqualTo
(final ObservableStringValue
the second ObservableStringValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is greater than or equal to another javafx.beans.value.ObservableStringValue.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThanOrEqualTo
(final String
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is greater than or equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
isEmpty
()

Creates a new BooleanBinding that holds true if this StringExpression is empty.

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final ObservableStringValue
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this and another javafx.beans.value.ObservableStringValue are equal.

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final String
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
isEqualToIgnoreCase
(final ObservableStringValue
the second ObservableStringValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this and another javafx.beans.value.ObservableStringValue are equal ignoring case.

public BooleanBinding

Returns:

the new BooleanBinding
isEqualToIgnoreCase
(final String
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is equal to a constant value ignoring case.

public BooleanBinding

Returns:

the new BooleanBinding
isNotEmpty
()

Creates a new BooleanBinding that holds true if this StringExpression is not empty.

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final ObservableStringValue
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this and another javafx.beans.value.ObservableStringValue are not equal.

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final String
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is not equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualToIgnoreCase
(final ObservableStringValue
the second ObservableStringValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this and another javafx.beans.value.ObservableStringValue are not equal ignoring case.

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualToIgnoreCase
(final String
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is not equal to a constant value ignoring case.

public BooleanBinding

Returns:

the new BooleanBinding
isNotNull
()

Creates a new BooleanBinding that holds true if this StringExpression is not null.

public BooleanBinding

Returns:

the new BooleanBinding
isNull
()

Creates a new BooleanBinding that holds true if this StringExpression is null.

public IntegerBinding

Returns:

the new IntegerBinding
length
()

Creates a new IntegerBinding that holds the length of this StringExpression.

public BooleanBinding

Returns:

the new BooleanBinding
lessThan
(final ObservableStringValue
the second ObservableStringValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is less than another javafx.beans.value.ObservableStringValue.

public BooleanBinding

Returns:

the new BooleanBinding
lessThan
(final String
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is less than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
lessThanOrEqualTo
(final ObservableStringValue
the second ObservableStringValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is less than or equal to another javafx.beans.value.ObservableStringValue.

public BooleanBinding

Returns:

the new BooleanBinding
lessThanOrEqualTo
(final String
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is less than or equal to a constant value.

public static StringExpression

Returns:

A StringExpression that wraps the ObservableValue if necessary
stringExpression
(final ObservableValue<?>
The source ObservableValue
value
)

Returns a StringExpression that wraps a javafx.beans.value.ObservableValue.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StringExpressionback to summary
public StringExpression()

Creates a default StringExpression.

Method Detail

concatback to summary
public StringExpression concat(Object other)

Returns a 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.

Parameters
other:Object

the other Object

Returns:StringExpression

the new StringExpression

getValueback to summary
public String getValue()

Implements javafx.beans.value.ObservableValue.getValue.

Doc from javafx.beans.value.ObservableValue.getValue.

Returns the current value of this ObservableValue

Returns:String

The current value

Annotations
@Override
getValueSafeback to summary
public final String getValueSafe()

Returns usually the value of this StringExpression. Only if the value is null an empty String is returned instead.

Returns:String

the value of this StringExpression or the empty String

greaterThanback to summary
public BooleanBinding greaterThan(final ObservableStringValue other)

Creates a new javafx.beans.binding.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.

Parameters
other:ObservableStringValue

the second ObservableStringValue

Returns:BooleanBinding

the new BooleanBinding

greaterThanback to summary
public BooleanBinding greaterThan(final String other)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is greater than a constant value.

Note

In this comparison a String that is null is considered equal to an empty String.

Parameters
other:String

the constant value

Returns:BooleanBinding

the new BooleanBinding

greaterThanOrEqualToback to summary
public BooleanBinding greaterThanOrEqualTo(final ObservableStringValue other)

Creates a new javafx.beans.binding.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.

Parameters
other:ObservableStringValue

the second ObservableStringValue

Returns:BooleanBinding

the new BooleanBinding

greaterThanOrEqualToback to summary
public BooleanBinding greaterThanOrEqualTo(final String other)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is greater than or equal to a constant value.

Note

In this comparison a String that is null is considered equal to an empty String.

Parameters
other:String

the constant value

Returns:BooleanBinding

the new BooleanBinding

isEmptyback to summary
public BooleanBinding isEmpty()

Creates a new BooleanBinding that holds true if this StringExpression is empty.

Note

If the value of this StringExpression is null, it is considered to be empty.

Returns:BooleanBinding

the new BooleanBinding

Since
JavaFX 8.0
isEqualToback to summary
public BooleanBinding isEqualTo(final ObservableStringValue other)

Creates a new javafx.beans.binding.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.

Parameters
other:ObservableStringValue

the constant value

Returns:BooleanBinding

the new BooleanBinding

isEqualToback to summary
public BooleanBinding isEqualTo(final String other)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is equal to a constant value.

Note

In this comparison a String that is null is considered equal to an empty String.

Parameters
other:String

the constant value

Returns:BooleanBinding

the new BooleanBinding

isEqualToIgnoreCaseback to summary
public BooleanBinding isEqualToIgnoreCase(final ObservableStringValue other)

Creates a new javafx.beans.binding.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.

Parameters
other:ObservableStringValue

the second ObservableStringValue

Returns:BooleanBinding

the new BooleanBinding

isEqualToIgnoreCaseback to summary
public BooleanBinding isEqualToIgnoreCase(final String other)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is equal to a constant value ignoring case.

Note

In this comparison a String that is null is considered equal to an empty String.

Parameters
other:String

the constant value

Returns:BooleanBinding

the new BooleanBinding

isNotEmptyback to summary
public BooleanBinding isNotEmpty()

Creates a new 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.

Returns:BooleanBinding

the new BooleanBinding

Since
JavaFX 8.0
isNotEqualToback to summary
public BooleanBinding isNotEqualTo(final ObservableStringValue other)

Creates a new javafx.beans.binding.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.

Parameters
other:ObservableStringValue

the constant value

Returns:BooleanBinding

the new BooleanBinding

isNotEqualToback to summary
public BooleanBinding isNotEqualTo(final String other)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is not equal to a constant value.

Note

In this comparison a String that is null is considered equal to an empty String.

Parameters
other:String

the constant value

Returns:BooleanBinding

the new BooleanBinding

isNotEqualToIgnoreCaseback to summary
public BooleanBinding isNotEqualToIgnoreCase(final ObservableStringValue other)

Creates a new javafx.beans.binding.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.

Parameters
other:ObservableStringValue

the second ObservableStringValue

Returns:BooleanBinding

the new BooleanBinding

isNotEqualToIgnoreCaseback to summary
public BooleanBinding isNotEqualToIgnoreCase(final String other)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is not equal to a constant value ignoring case.

Note

In this comparison a String that is null is considered equal to an empty String.

Parameters
other:String

the constant value

Returns:BooleanBinding

the new BooleanBinding

isNotNullback to summary
public BooleanBinding isNotNull()

Creates a new BooleanBinding that holds true if this StringExpression is not null.

Returns:BooleanBinding

the new BooleanBinding

isNullback to summary
public BooleanBinding isNull()

Creates a new BooleanBinding that holds true if this StringExpression is null.

Returns:BooleanBinding

the new BooleanBinding

lengthback to summary
public IntegerBinding length()

Creates a new IntegerBinding that holds the length of this StringExpression.

Note

If the value of this StringExpression is null, the length is considered to be 0.

Returns:IntegerBinding

the new IntegerBinding

Since
JavaFX 8.0
lessThanback to summary
public BooleanBinding lessThan(final ObservableStringValue other)

Creates a new javafx.beans.binding.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.

Parameters
other:ObservableStringValue

the second ObservableStringValue

Returns:BooleanBinding

the new BooleanBinding

lessThanback to summary
public BooleanBinding lessThan(final String other)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is less than a constant value.

Note

In this comparison a String that is null is considered equal to an empty String.

Parameters
other:String

the constant value

Returns:BooleanBinding

the new BooleanBinding

lessThanOrEqualToback to summary
public BooleanBinding lessThanOrEqualTo(final ObservableStringValue other)

Creates a new javafx.beans.binding.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.

Parameters
other:ObservableStringValue

the second ObservableStringValue

Returns:BooleanBinding

the new BooleanBinding

lessThanOrEqualToback to summary
public BooleanBinding lessThanOrEqualTo(final String other)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this StringExpression is less than or equal to a constant value.

Note

In this comparison a String that is null is considered equal to an empty String.

Parameters
other:String

the constant value

Returns:BooleanBinding

the new BooleanBinding

stringExpressionback to summary
public static StringExpression stringExpression(final ObservableValue<?> value)

Returns a StringExpression that wraps a javafx.beans.value.ObservableValue. If the ObservableValue is already a StringExpression, it will be returned. Otherwise a new javafx.beans.binding.StringBinding is created that holds the value of the ObservableValue converted to a String.

Parameters
value:ObservableValue<?>

The source ObservableValue

Returns:StringExpression

A StringExpression that wraps the ObservableValue if necessary

Exceptions
NullPointerException:
if value is null