java.lang.Object
javafx.beans.binding.ObjectExpression<T>
javafx.beans.property.ReadOnlyObjectProperty<T>
javafx.beans.property.ObjectProperty<T>
javafx.beans.property.ObjectPropertyBase<T>
javafx.beans.property.SimpleObjectProperty<T>
org.jhotdraw8.fxbase.beans.NonNullObjectProperty<T>
- Type Parameters:
T- the value type
- All Implemented Interfaces:
javafx.beans.Observable,javafx.beans.property.Property<T>,javafx.beans.property.ReadOnlyProperty<T>,javafx.beans.value.ObservableObjectValue<T>,javafx.beans.value.ObservableValue<T>,javafx.beans.value.WritableObjectValue<T>,javafx.beans.value.WritableValue<T>
public class NonNullObjectProperty<T>
extends javafx.beans.property.SimpleObjectProperty<T>
A
NonNullProperty throws an IllegalArgumentException when
attempting to set its value to null.- Author:
- Werner Randelshofer
-
Constructor Summary
ConstructorsConstructorDescriptionNonNullObjectProperty(Object bean, String name, T initialValue) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidSets a new value if it is not null.voidsetNonNull(T newValue) Methods inherited from class javafx.beans.property.SimpleObjectProperty
getBean, getNameMethods inherited from class javafx.beans.property.ObjectPropertyBase
addListener, addListener, bind, get, invalidated, isBound, removeListener, removeListener, toString, unbindMethods inherited from class javafx.beans.property.ObjectProperty
bindBidirectional, setValue, unbindBidirectionalMethods inherited from class javafx.beans.binding.ObjectExpression
asString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpressionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.beans.Observable
subscribeMethods inherited from interface javafx.beans.value.ObservableValue
flatMap, getValue, map, orElse, subscribe, subscribe, whenMethods inherited from interface javafx.beans.value.WritableValue
getValue
-
Constructor Details
-
NonNullObjectProperty
Creates a new instance.- Parameters:
bean- The bean which holds this propertyname- The name of the propertyinitialValue- The initial value. NonNull.
-
-
Method Details
-
fireValueChangedEvent
protected void fireValueChangedEvent()- Overrides:
fireValueChangedEventin classjavafx.beans.property.ObjectPropertyBase<T>
-
set
Sets a new value if it is not null. -
getNonNull
-
setNonNull
-