- java.lang.Object
- 
- javafx.beans.binding.StringExpression
 
- 
- All Implemented Interfaces:
- Observable,- ObservableObjectValue<String>,- ObservableStringValue,- ObservableValue<String>
 - Direct Known Subclasses:
- ReadOnlyStringProperty,- StringBinding
 
 
 public abstract class StringExpression extends Object implements ObservableStringValue StringExpressionis anObservableStringValueplus additional convenience methods to generate bindings in a fluent style.A concrete sub-class of StringExpressionhas to implement the methodObservableObjectValue.get(), which provides the actual value of this expression.Note: all implementation of BooleanBindingreturned by the comparisons in this class consider aStringthat isnullequal to an emptyString.- Since:
- JavaFX 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description StringExpression()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringExpressionconcat(Object other)Returns aStringExpressionthat holds the value of thisStringExpressionconcatenated with anotherObject.StringgetValue()Returns the current value of thisObservableValueStringgetValueSafe()Returns usually the value of thisStringExpression.BooleanBindinggreaterThan(String other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than a constant value.BooleanBindinggreaterThan(ObservableStringValue other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than anotherObservableStringValue.BooleanBindinggreaterThanOrEqualTo(String other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than or equal to a constant value.BooleanBindinggreaterThanOrEqualTo(ObservableStringValue other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than or equal to anotherObservableStringValue.BooleanBindingisEmpty()BooleanBindingisEqualTo(String other)BooleanBindingisEqualTo(ObservableStringValue other)BooleanBindingisEqualToIgnoreCase(String other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis equal to a constant value ignoring case.BooleanBindingisEqualToIgnoreCase(ObservableStringValue other)Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare equal ignoring case.BooleanBindingisNotEmpty()BooleanBindingisNotEqualTo(String other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis not equal to a constant value.BooleanBindingisNotEqualTo(ObservableStringValue other)Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare not equal.BooleanBindingisNotEqualToIgnoreCase(String other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis not equal to a constant value ignoring case.BooleanBindingisNotEqualToIgnoreCase(ObservableStringValue other)Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare not equal ignoring case.BooleanBindingisNotNull()BooleanBindingisNull()IntegerBindinglength()Creates a newIntegerBindingthat holds the length of thisStringExpression.BooleanBindinglessThan(String other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than a constant value.BooleanBindinglessThan(ObservableStringValue other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than anotherObservableStringValue.BooleanBindinglessThanOrEqualTo(String other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than or equal to a constant value.BooleanBindinglessThanOrEqualTo(ObservableStringValue other)Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than or equal to anotherObservableStringValue.static StringExpressionstringExpression(ObservableValue<?> value)Returns aStringExpressionthat wraps aObservableValue.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface javafx.beans.ObservableaddListener, removeListener
 - 
Methods inherited from interface javafx.beans.value.ObservableObjectValueget
 - 
Methods inherited from interface javafx.beans.value.ObservableValueaddListener, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getValuepublic String getValue() Description copied from interface:ObservableValueReturns the current value of thisObservableValue- Specified by:
- getValuein interface- ObservableValue<String>
- Returns:
- The current value
 
 - 
getValueSafepublic final String getValueSafe() Returns usually the value of thisStringExpression. Only if the value isnullan emptyStringis returned instead.- Returns:
- the value of this StringExpressionor the emptyString
 
 - 
stringExpressionpublic static StringExpression stringExpression(ObservableValue<?> value) Returns aStringExpressionthat wraps aObservableValue. If theObservableValueis already aStringExpression, it will be returned. Otherwise a newStringBindingis created that holds the value of theObservableValueconverted to aString.- Parameters:
- value- The source- ObservableValue
- Returns:
- A StringExpressionthat wraps theObservableValueif necessary
- Throws:
- NullPointerException- if- valueis- null
 
 - 
concatpublic StringExpression concat(Object other) Returns aStringExpressionthat holds the value of thisStringExpressionconcatenated with anotherObject.If the value of this StringExpressionchanges, the value of the resultingStringExpressionis updated automatically. Also if the otherObjectis an implementation ofObservableValue, changes in the otherObjectare reflected automatically in the resultingStringExpression.- Parameters:
- other- the other- Object
- Returns:
- the new StringExpression
 
 - 
isEqualTopublic BooleanBinding isEqualTo(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare equal.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
isEqualTopublic BooleanBinding isEqualTo(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis equal to a constant value.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
isNotEqualTopublic BooleanBinding isNotEqualTo(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare not equal.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
isNotEqualTopublic BooleanBinding isNotEqualTo(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis not equal to a constant value.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
isEqualToIgnoreCasepublic BooleanBinding isEqualToIgnoreCase(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare equal ignoring case.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the second- ObservableStringValue
- Returns:
- the new BooleanBinding
 
 - 
isEqualToIgnoreCasepublic BooleanBinding isEqualToIgnoreCase(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis equal to a constant value ignoring case.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
isNotEqualToIgnoreCasepublic BooleanBinding isNotEqualToIgnoreCase(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare not equal ignoring case.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the second- ObservableStringValue
- Returns:
- the new BooleanBinding
 
 - 
isNotEqualToIgnoreCasepublic BooleanBinding isNotEqualToIgnoreCase(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis not equal to a constant value ignoring case.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
greaterThanpublic BooleanBinding greaterThan(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than anotherObservableStringValue.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the second- ObservableStringValue
- Returns:
- the new BooleanBinding
 
 - 
greaterThanpublic BooleanBinding greaterThan(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than a constant value.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
lessThanpublic BooleanBinding lessThan(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than anotherObservableStringValue.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the second- ObservableStringValue
- Returns:
- the new BooleanBinding
 
 - 
lessThanpublic BooleanBinding lessThan(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than a constant value.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
greaterThanOrEqualTopublic BooleanBinding greaterThanOrEqualTo(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than or equal to anotherObservableStringValue.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the second- ObservableStringValue
- Returns:
- the new BooleanBinding
 
 - 
greaterThanOrEqualTopublic BooleanBinding greaterThanOrEqualTo(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than or equal to a constant value.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
lessThanOrEqualTopublic BooleanBinding lessThanOrEqualTo(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than or equal to anotherObservableStringValue.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the second- ObservableStringValue
- Returns:
- the new BooleanBinding
 
 - 
lessThanOrEqualTopublic BooleanBinding lessThanOrEqualTo(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than or equal to a constant value.Note: In this comparison a Stringthat isnullis considered equal to an emptyString.- Parameters:
- other- the constant value
- Returns:
- the new BooleanBinding
 
 - 
isNullpublic BooleanBinding isNull() - Returns:
- the new BooleanBinding
 
 - 
isNotNullpublic BooleanBinding isNotNull() - Returns:
- the new BooleanBinding
 
 - 
lengthpublic IntegerBinding length() Creates a newIntegerBindingthat holds the length of thisStringExpression.Note: If the value of this StringExpressionisnull, the length is considered to be0.- Returns:
- the new IntegerBinding
- Since:
- JavaFX 8.0
 
 - 
isEmptypublic BooleanBinding isEmpty() Creates a newBooleanBindingthat holdstrueif thisStringExpressionis empty.Note: If the value of this StringExpressionisnull, it is considered to be empty.- Returns:
- the new BooleanBinding
- Since:
- JavaFX 8.0
 
 - 
isNotEmptypublic BooleanBinding isNotEmpty() Creates a newBooleanBindingthat holdstrueif thisStringExpressionis not empty.Note: If the value of this StringExpressionisnull, it is considered to be empty.- Returns:
- the new BooleanBinding
- Since:
- JavaFX 8.0
 
 
- 
 
-