public StringProperty immutableField ( StringGetter < M > getter , StringImmutableSetter < M > immutableSetter ) { return addImmutable ( new ImmutableBeanPropertyField <> ( this :: propertyWasChanged , getter , immutableSetter , SimpleStringProperty :: new ) ) ; }
Add a new immutable field of type String to this instance of the wrapper . This method is used for immutable model elements that have getters to get values for it s fields but not setters . Instead immutables have methods that take a new value for a field and return a new cloned instance of the model element with only this field updated to the new value . The old model instance isn t changed .