Class PropertyChangeObject
java.lang.Object
com.pnfsoftware.jeb.core.properties.impl.PropertyChangeObject
Record property changes without applying them, nor notifying listeners, until a call to
commit() is made.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRecorded property change entry. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(IPropertyManager pm, String fqname, Object value, IPropertyDefinition pd) Record a property change for a property manager.voidcommit()Commit all recorded changes and notify listeners.voidcommit(boolean notify) Commit all recorded changes.Get the currently recorded value for a fully-qualified property name.booleanDetermine whether a change for a fully-qualified property name is already recorded.booleanisEmpty()Determine whether no property change has been recorded.intsize()Get the number of recorded property changes.toString()
-
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:
trueif the change set is empty
-
has
Determine whether a change for a fully-qualified property name is already recorded.- Parameters:
fqname- fully-qualified property name- Returns:
trueif a change exists for that property
-
get
Get the currently recorded value for a fully-qualified property name.- Parameters:
fqname- fully-qualified property name- Returns:
- the recorded value, or
nullif none exists
-
add
public PropertyChangeObject.Entry add(IPropertyManager pm, String fqname, Object value, IPropertyDefinition pd) Record a property change for a property manager.- Parameters:
pm- property manager owning the changefqname- fully-qualified property namevalue- value to be stored, ornullto clear the propertypd- 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
-