APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.badlogic.gdx.utils

public Class PooledLinkedList<T>

extends Object
Class Inheritance

A simple linked list that pools its nodes.
Author
mzechner

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private PooledLinkedList.Item<T>
private PooledLinkedList.Item<T>
private PooledLinkedList.Item<T>
private final Pool<PooledLinkedList.Item<T>>
private int
private PooledLinkedList.Item<T>

Constructor Summary

AccessConstructor and Description
public
PooledLinkedList(int maxPoolSize)

Method Summary

Modifier and TypeMethod and Description
public void
add(T object)

Adds the specified object to the end of the list regardless of iteration status

public void
addFirst(T object)

Adds the specified object to the head of the list regardless of iteration status

public void
public void
iter()

Starts iterating over the list's items from the head of the list

public void
iterReverse()

Starts iterating over the list's items from the tail of the list

public T

Returns:

the next item in the list or null if there are no more items
next
()

Gets the next item in the list

public T

Returns:

the previous item in the list or null if there are no more items
previous
()

Gets the previous item in the list

public void
remove()

Removes the current list item based on the iterator position.

public T
removeLast()

Removes the tail of the list regardless of iteration status

public int
size()

Returns the number of items in the list

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currback to summary
private PooledLinkedList.Item<T> curr
iterback to summary
private PooledLinkedList.Item<T> iter
poolback to summary
private final Pool<PooledLinkedList.Item<T>> pool
sizeback to summary
private int size
tailback to summary
private PooledLinkedList.Item<T> tail

Constructor Detail

PooledLinkedListback to summary
public PooledLinkedList(int maxPoolSize)

Method Detail

addback to summary
public void add(T object)

Adds the specified object to the end of the list regardless of iteration status

addFirstback to summary
public void addFirst(T object)

Adds the specified object to the head of the list regardless of iteration status

clearback to summary
public void clear()
iterback to summary
public void iter()

Starts iterating over the list's items from the head of the list

iterReverseback to summary
public void iterReverse()

Starts iterating over the list's items from the tail of the list

nextback to summary
public T next()

Gets the next item in the list

Returns:T

the next item in the list or null if there are no more items

Annotations
@Null
previousback to summary
public T previous()

Gets the previous item in the list

Returns:T

the previous item in the list or null if there are no more items

Annotations
@Null
removeback to summary
public void remove()

Removes the current list item based on the iterator position.

removeLastback to summary
public T removeLast()

Removes the tail of the list regardless of iteration status

Annotations
@Null
sizeback to summary
public int size()

Returns the number of items in the list

com.badlogic.gdx.utils back to summary

pack-priv final Class PooledLinkedList.Item<T>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public PooledLinkedList.Item<T>
public T
public PooledLinkedList.Item<T>

Constructor Summary

AccessConstructor and Description
pack-priv
Item()

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nextback to summary
public PooledLinkedList.Item<T> next
payloadback to summary
public T payload
prevback to summary
public PooledLinkedList.Item<T> prev

Constructor Detail

Itemback to summary
pack-priv Item()