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>
LinkedListSetthat provides strict adherence to ensuring correctness.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classStrictLinkedListSet.LinkedListItemImplImplementation of theLinkedListSetItem.
-
Constructor Summary
Constructors Constructor Description StrictLinkedListSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddEntry(E entry)Adds aLinkedListSetEntryto thisLinkedListSet.LinkedListSetItem<E>copyEntries()Creates a copy of thisLinkedListSetreturning the head of the copy.EgetHead()Obtains the head of thisLinkedListSet.protected abstract OgetOwner()Obtains the owner of thisLinkedListSet.EgetTail()Obtains the tail of thisLinkedListSet.EpurgeEntries()Purges allLinkedListSetEntryinstances within thisLinkedListSet.booleanremoveEntry(E entry)Removes thisLinkedListSetEntryfrom 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:LinkedListSetObtains the head of thisLinkedListSet.- Specified by:
getHeadin interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>- Returns:
- Head
LinkedListSetEntryof thisLinkedListSet.
-
getTail
public final E getTail()
Description copied from interface:LinkedListSetObtains the tail of thisLinkedListSet.- Specified by:
getTailin interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>- Returns:
- Tail of this
LinkedListSet.
-
addEntry
public void addEntry(E entry)
Description copied from interface:LinkedListSetAdds aLinkedListSetEntryto thisLinkedListSet.- Specified by:
addEntryin interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>- Parameters:
entry-LinkedListSetEntryto be added to thisLinkedListSet.
-
removeEntry
public final boolean removeEntry(E entry)
Description copied from interface:LinkedListSetRemoves thisLinkedListSetEntryfrom theLinkedListSet.- Specified by:
removeEntryin interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>- Parameters:
entry-LinkedListSetEntryto be removed from thisLinkedListSet.- Returns:
trueif theLinkedListSetEntryjust removed was the lastLinkedListSetEntryin theLinkedListSet.
-
purgeEntries
public final E purgeEntries()
Description copied from interface:LinkedListSetPurges allLinkedListSetEntryinstances within thisLinkedListSet.- Specified by:
purgeEntriesin interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>- Returns:
- Head of the
LinkedListSet(before the purge) so that may action theLinkedListSetEntryinstances.
-
copyEntries
public final LinkedListSetItem<E> copyEntries()
Description copied from interface:LinkedListSetCreates a copy of this
LinkedListSetreturning the head of the copy.The returned copy is
Threadsafe to iterate.- Specified by:
copyEntriesin interfaceLinkedListSet<E extends LinkedListSetEntry<E,O>,O>- Returns:
- Head
LinkedListSetItemof the copy.
-
-