FreezableUtils

public final classFreezableUtilsextendsObject

Utilities for working withFreezable objects.

Public Constructor Summary

Public Method Summary

static <T, E extendsFreezable<T>> ArrayList<T>
freeze(E[] array)
Utility helper method to freeze an array of freezable entities into a list of concrete entities.
static <T, E extendsFreezable<T>> ArrayList<T>
freeze(ArrayList<E> list)
Utility helper method to freeze a list of freezable entities into a list of concrete entities.
static <T, E extendsFreezable<T>> ArrayList<T>
freezeIterable(Iterable<E> iterable)
Utility helper method to freeze an array of freezable entities into a list of concrete entities.

Inherited Method Summary

Public Constructors

publicFreezableUtils()

Public Methods

public staticArrayList<T> freeze(E[] array)

Utility helper method to freeze an array of freezable entities into a list of concrete entities. The array provided here must contain elements that implement the Freezable interface.

Type T is the type of object returned by freezing an element of the array. In most cases, this will be the same asE.

Type E is the type of object contained in the array. Must implementFreezable.

Parameters
array Array to freeze contents from.
Returns
  • ArrayList of frozen representations of the object present in the provided array.

public staticArrayList<T> freeze(ArrayList<E> list)

Utility helper method to freeze a list of freezable entities into a list of concrete entities. The list provided here must contain elements that implement the Freezable interface.

Type T is the type of object returned by freezing an element of the list. In most cases, this will be the same asE.

Type E is the type of object contained in the list. Must implementFreezable.

Parameters
list ArrayListto freeze contents from.
Returns
  • ArrayList of frozen representations of the object present in the provided list.

public staticArrayList<T> freezeIterable(Iterable<E> iterable)

Utility helper method to freeze an array of freezable entities into a list of concrete entities. The array provided here must contain elements that implement the Freezable interface.

Type T is the type of object returned by freezing an element of the array. In most cases, this will be the same asE.

Type E is the type of object contained in the array. Must implementFreezable.

Parameters
iterable Iterable to freeze contents from.
Returns
  • ArrayList of frozen representations of the object present in the provided array.