Class PropertyChangeObject

java.lang.Object
com.pnfsoftware.jeb.core.properties.impl.PropertyChangeObject

public class PropertyChangeObject extends Object
Record property changes without applying them, nor notifying listeners, until a call to commit() is made.
  • Constructor Details

    • PropertyChangeObject

      public PropertyChangeObject()
      Create an empty change set.
  • Method Details

    • size

      public int size()
      Get the number of recorded property changes.
      Returns:
      the number of tracked entries
    • isEmpty

      public boolean isEmpty()
      Determine whether no property change has been recorded.
      Returns:
      true if the change set is empty
    • has

      public boolean has(String fqname)
      Determine whether a change for a fully-qualified property name is already recorded.
      Parameters:
      fqname - fully-qualified property name
      Returns:
      true if a change exists for that property
    • get

      public Object get(String fqname)
      Get the currently recorded value for a fully-qualified property name.
      Parameters:
      fqname - fully-qualified property name
      Returns:
      the recorded value, or null if none exists
    • add

      Record a property change for a property manager.
      Parameters:
      pm - property manager owning the change
      fqname - fully-qualified property name
      value - value to be stored, or null to clear the property
      pd - property definition associated with the change
      Returns:
      the recorded entry
    • commit

      public void commit()
      Commit all recorded changes and notify listeners.
    • commit

      public void commit(boolean notify)
      Commit all recorded changes.
      Parameters:
      notify - ignored in the current implementation; listeners are always notified
    • toString

      public String toString()
      Overrides:
      toString in class Object