Class StrictLinkedListSet<E extends LinkedListSetEntry<E,O>,O>
- java.lang.Object
-
- net.officefloor.frame.impl.execute.linkedlistset.StrictLinkedListSet<E,O>
-
- All Implemented Interfaces:
LinkedListSet<E,O>
- Direct Known Subclasses:
ComparatorLinkedListSet
public abstract class StrictLinkedListSet<E extends LinkedListSetEntry<E,O>,O> extends java.lang.Object implements LinkedListSet<E,O>
LinkedListSet
that provides strict adherence to ensuring correctness.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
StrictLinkedListSet.LinkedListItemImpl
Implementation of theLinkedListSetItem
.
-
Constructor Summary
Constructors Constructor Description StrictLinkedListSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addEntry(E entry)
Adds aLinkedListSetEntry
to thisLinkedListSet
.LinkedListSetItem<E>
copyEntries()
Creates a copy of thisLinkedListSet
returning the head of the copy.E
getHead()
Obtains the head of thisLinkedListSet
.protected abstract O
getOwner()
Obtains the owner of thisLinkedListSet
.E
getTail()
Obtains the tail of thisLinkedListSet
.E
purgeEntries()
Purges allLinkedListSetEntry
instances within thisLinkedListSet
.boolean
removeEntry(E entry)
Removes thisLinkedListSetEntry
from theLinkedListSet
.
-
-
-
Method Detail
-
getOwner
protected abstract O getOwner()
Obtains the owner of thisLinkedListSet
.- Returns:
- Owner of this
LinkedListSet
.
-
getHead
public final E getHead()
Description copied from interface:LinkedListSet
Obtains the head of thisLinkedListSet
.- Specified by:
getHead
in interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>
- Returns:
- Head
LinkedListSetEntry
of thisLinkedListSet
.
-
getTail
public final E getTail()
Description copied from interface:LinkedListSet
Obtains the tail of thisLinkedListSet
.- Specified by:
getTail
in interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>
- Returns:
- Tail of this
LinkedListSet
.
-
addEntry
public void addEntry(E entry)
Description copied from interface:LinkedListSet
Adds aLinkedListSetEntry
to thisLinkedListSet
.- Specified by:
addEntry
in interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>
- Parameters:
entry
-LinkedListSetEntry
to be added to thisLinkedListSet
.
-
removeEntry
public final boolean removeEntry(E entry)
Description copied from interface:LinkedListSet
Removes thisLinkedListSetEntry
from theLinkedListSet
.- Specified by:
removeEntry
in interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>
- Parameters:
entry
-LinkedListSetEntry
to be removed from thisLinkedListSet
.- Returns:
true
if theLinkedListSetEntry
just removed was the lastLinkedListSetEntry
in theLinkedListSet
.
-
purgeEntries
public final E purgeEntries()
Description copied from interface:LinkedListSet
Purges allLinkedListSetEntry
instances within thisLinkedListSet
.- Specified by:
purgeEntries
in interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>
- Returns:
- Head of the
LinkedListSet
(before the purge) so that may action theLinkedListSetEntry
instances.
-
copyEntries
public final LinkedListSetItem<E> copyEntries()
Description copied from interface:LinkedListSet
Creates a copy of this
LinkedListSet
returning the head of the copy.The returned copy is
Thread
safe to iterate.- Specified by:
copyEntries
in interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>
- Returns:
- Head
LinkedListSetItem
of the copy.
-
-