Code example for PropertyChangeSupport

Methods: fireIndexedPropertyChange

0
        this.value = value;
 
        this.index = index;
        this.name = INTEGER;
 
        this.pcs.fireIndexedPropertyChange(INTEGER, index,
                oldInt, value);
    } 
 
    public void propertyChange(PropertyChangeEvent event) {
        Object value = event.getNewValue();
        if (value.equals(event.getOldValue())) {
            throw new Error("new value is equal to old one");
        } 
        if (!this.name.equals(event.getPropertyName())) {
            throw new Error("unexpected property name");
        } else if (this.name.equals(COLOR)) {
            if (!value.equals(this.color)) {
                throw new Error("unexpected object value");
            } 
Experience pair programming with AI  Get Codota for Java