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

public Class DefaultPool<T>

extends Pool<T>
Class Inheritance

Default Pool implementation that creates a new instances of a type based on a supplier.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
DefaultPool.PoolSupplier<T>

An interface that is used to create objects for the Pool.

Field Summary

Modifier and TypeField and Description
private final DefaultPool.PoolSupplier<T>
Inherited from com.badlogic.gdx.utils.Pool:
maxpeak

Constructor Summary

AccessConstructor and Description
public
public
DefaultPool(DefaultPool.PoolSupplier<T> supplier, int initialCapacity)

public
DefaultPool(DefaultPool.PoolSupplier<T> supplier, int initialCapacity, int max)

Method Summary

Modifier and TypeMethod and Description
protected T
Inherited from com.badlogic.gdx.utils.Pool:
cleardiscardfillfreefreeAllgetFreeobtainreset

Field Detail

poolTypeSupplierback to summary
private final DefaultPool.PoolSupplier<T> poolTypeSupplier

Constructor Detail

DefaultPoolback to summary
public DefaultPool(DefaultPool.PoolSupplier<T> supplier)
DefaultPoolback to summary
public DefaultPool(DefaultPool.PoolSupplier<T> supplier, int initialCapacity)
DefaultPoolback to summary
public DefaultPool(DefaultPool.PoolSupplier<T> supplier, int initialCapacity, int max)

Method Detail

newObjectback to summary
protected T newObject()

Implements abstract com.badlogic.gdx.utils.Pool.newObject.

Annotations
@Override
com.badlogic.gdx.utils back to summary

public Interface DefaultPool.PoolSupplier<T>


An interface that is used to create objects for the Pool. Even tho not annotated with "FunctionalInterface", it can act as one.
You can use a constructor reference or lambda as a PoolSupplier, such as with MyClass::new or () -> new MyClass().

Method Summary

Modifier and TypeMethod and Description
public T
get()

Method Detail

getback to summary
public T get()