public abstract class AbstractSet extends AbstractCollection implements Set, Rollbackable
Collection
,
AbstractCollection
,
Set
,
HashSet
,
TreeSet
,
LinkedHashSet
$CHECKPOINT, $RECORD$$CHECKPOINT
Modifier | Constructor and Description |
---|---|
protected |
AbstractSet()
The main constructor, for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
void |
$COMMIT(long timestamp)
Commit changes up to the given timestamp, but not including changes
made at timestamp and afterward.
|
void |
$RESTORE(long timestamp,
boolean trim)
Restore a previous state to all the private fields of this rollbackable
object.
|
boolean |
equals(java.lang.Object o)
Tests whether the given object is equal to this Set.
|
int |
hashCode()
Returns a hash code for this Set.
|
boolean |
removeAll(Collection c)
Removes from this set all elements in the given collection (optional
operation).
|
$GET$CHECKPOINT, $SET$CHECKPOINT, add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
$GET$CHECKPOINT, $SET$CHECKPOINT, add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray
public boolean equals(java.lang.Object o)
equals
in interface Collection
equals
in interface Set
equals
in class java.lang.Object
o
- the Object to be tested for equality with this Setpublic int hashCode()
hashCode
in interface Collection
hashCode
in interface Set
hashCode
in class java.lang.Object
Set.equals(Object)
public boolean removeAll(Collection c)
size()
to determine
the smaller collection. Then, if this set is smaller, it iterates
over the set, calling Iterator.remove if the collection contains
the element. If this set is larger, it iterates over the collection,
calling Set.remove for all elements in the collection. Note that
this operation will fail if a remove methods is not supported.removeAll
in interface Collection
removeAll
in interface Set
removeAll
in class AbstractCollection
c
- the collection of elements to removejava.lang.UnsupportedOperationException
- if remove is not supportedjava.lang.NullPointerException
- if the collection is nullAbstractCollection.remove(Object)
,
Collection.contains(Object)
,
Iterator.remove()
public void $COMMIT(long timestamp)
Rollbackable
$COMMIT
in interface Rollbackable
$COMMIT
in interface Collection
$COMMIT
in interface Set
$COMMIT
in class AbstractCollection
timestamp
- The timestamp.public void $RESTORE(long timestamp, boolean trim)
Rollbackable
$RESTORE
in interface Rollbackable
$RESTORE
in interface Collection
$RESTORE
in interface Set
$RESTORE
in class AbstractCollection
timestamp
- The timestamp taken at the time when the previous
state was recorded.trim
- Whether to delete the records used for the rollback.Checkpoint.rollback(long, boolean)