Class StringProperty

java.lang.Object
com.iohao.net.common.kit.beans.property.StringProperty
All Implemented Interfaces:
PropertyValueObservable<String>

public final class StringProperty extends Object
String - Property has listening feature. A listening event will be triggered when the value changes.
        var property = new StringProperty();
        // add listener monitor property object
        property.addListener((observable, oldValue, newValue) -> {
            log.info("oldValue:{}, newValue:{}", oldValue, newValue);
        });

        property.get(); // value is null
        property.set("22"); // When the value changes,listeners are triggered
        property.get(); // value is "22"

Author:
渔民小镇
date:
2024-04-17