Interface LinkedListSet<I extends LinkedListSetEntry<I,O>,O>
- All Known Implementing Classes:
ComparatorLinkedListSet,StrictLinkedListSet
public interface LinkedListSet<I extends LinkedListSetEntry<I,O>,O>
Linked List maintaining a unique set of
LinkedListSetEntry.- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds aLinkedListSetEntryto thisLinkedListSet.Creates a copy of thisLinkedListSetreturning the head of the copy.getHead()Obtains the head of thisLinkedListSet.getTail()Obtains the tail of thisLinkedListSet.Purges allLinkedListSetEntryinstances within thisLinkedListSet.booleanremoveEntry(I entry) Removes thisLinkedListSetEntryfrom theLinkedListSet.
-
Method Details
-
getHead
I getHead()Obtains the head of thisLinkedListSet.- Returns:
- Head
LinkedListSetEntryof thisLinkedListSet.
-
getTail
I getTail()Obtains the tail of thisLinkedListSet.- Returns:
- Tail of this
LinkedListSet.
-
addEntry
Adds aLinkedListSetEntryto thisLinkedListSet.- Parameters:
entry-LinkedListSetEntryto be added to thisLinkedListSet.- Throws:
IllegalStateException- IfLinkedListSetEntryis not valid for thisLinkedListSet.
-
removeEntry
Removes thisLinkedListSetEntryfrom theLinkedListSet.- Parameters:
entry-LinkedListSetEntryto be removed from thisLinkedListSet.- Returns:
trueif theLinkedListSetEntryjust removed was the lastLinkedListSetEntryin theLinkedListSet.- Throws:
IllegalStateException- IfLinkedListSetEntryis not valid for thisLinkedListSet.
-
purgeEntries
I purgeEntries()Purges allLinkedListSetEntryinstances within thisLinkedListSet.- Returns:
- Head of the
LinkedListSet(before the purge) so that may action theLinkedListSetEntryinstances.
-
copyEntries
LinkedListSetItem<I> copyEntries()Creates a copy of this
LinkedListSetreturning the head of the copy.The returned copy is
Threadsafe to iterate.- Returns:
- Head
LinkedListSetItemof the copy.
-