Package org.oscim.utils.pool
Class Inlist.List<T extends Inlist<?>>
java.lang.Object
org.oscim.utils.pool.Inlist.List<T>
- Direct Known Subclasses:
VertexData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend item, O(n) - use push() and reverse() to iterate in insertion order!voidappendList(T list) Append Inlist.clear()Clear list.booleanhasNext()Iterator: Has next itemhead()iterator()NB: Only one iterator at a time possible!next()Iterator: Get next itempop()Insert item at start of list.voidInsert single item at start of list.voidremove()Iterator: Remove current itemvoidRemove item from list.voidreverse()Reverse list.intsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
List
public List()
-
-
Method Details
-
push
Insert single item at start of list. item.next must be null. -
pop
Insert item at start of list. -
reverse
public void reverse()Reverse list. -
append
Append item, O(n) - use push() and reverse() to iterate in insertion order! -
appendList
Append Inlist. -
remove
Remove item from list. -
clear
Clear list.- Returns:
- head of list
-
head
- Returns:
- first node in list
-
hasNext
public boolean hasNext()Iterator: Has next item -
next
Iterator: Get next item -
remove
public void remove()Iterator: Remove current item -
iterator
NB: Only one iterator at a time possible! -
size
public int size()
-