public class CollectionChangeTrackerImpl extends AbstractChangeTracker implements CollectionChangeTracker
CollectionChangeTracker
.Modifier and Type | Field and Description |
---|---|
protected Collection |
_coll |
protected boolean |
_dups |
protected boolean |
_order |
add, change, rem
Constructor and Description |
---|
CollectionChangeTrackerImpl(Collection coll,
boolean dups,
boolean order,
boolean autoOff)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(Object elem)
Mark the given value as added.
|
void |
added(Object elem)
Notify the tracker that the given object was added.
|
boolean |
allowsDuplicates()
Whether the underlying collection allows duplicates.
|
protected void |
change(Object elem)
Mark the given value as changed.
|
protected int |
initialSequence()
Return the initial sequence value for this proxy.
|
boolean |
isOrdered()
Whether the underlying collection is ordered.
|
protected void |
remove(Object elem)
Mark the given value as removed.
|
void |
removed(Object elem)
Notify the tracker that the given object was removed.
|
changed, getAdded, getAutoOff, getChanged, getNextSequence, getRemoved, isTracking, newSet, reset, setAutoOff, setNextSequence, startTracking, stopTracking
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAdded, getChanged, getNextSequence, getRemoved, isTracking, setNextSequence, startTracking, stopTracking
protected final Collection _coll
protected final boolean _dups
protected final boolean _order
public CollectionChangeTrackerImpl(Collection coll, boolean dups, boolean order, boolean autoOff)
coll
- the collection to delegate todups
- true if the collection allows duplicates, false otherwiseorder
- true if the collection is ordered, false otherwisepublic boolean allowsDuplicates()
public boolean isOrdered()
public void added(Object elem)
AbstractChangeTracker
added
in interface CollectionChangeTracker
added
in class AbstractChangeTracker
public void removed(Object elem)
AbstractChangeTracker
removed
in interface CollectionChangeTracker
removed
in class AbstractChangeTracker
protected int initialSequence()
AbstractChangeTracker
initialSequence
in class AbstractChangeTracker
protected void add(Object elem)
AbstractChangeTracker
add
in class AbstractChangeTracker
protected void remove(Object elem)
AbstractChangeTracker
remove
in class AbstractChangeTracker
protected void change(Object elem)
AbstractChangeTracker
change
in class AbstractChangeTracker
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.