net.algart.model3d.common.movement.model
Interface ItemListBuilder


public interface ItemListBuilder

Builder of the item list, used for storing items by SimpleItemSet and GridItemSet classes. Namely, the constructors of these classes call newItemList() method of this interface to create the built-in list java.util.List<Item>.

The simplest default implementation of this interface just creates new empty java.util.ArrayList<Item>. But if you want to store items by another method (for example, in a database or in AlgART arrays), you can do it via a special implementation of this interface, where newItemList() method creates the corresponding custom implementation of java.util.List interface, which provides the necessary functionality.

Important! The java.util.List object, created by newItemList() method, must support (implement), at least, the following optional list operations:

AlgART Laboratory 2010

Since:
JDK 1.5
Version:
1.0
Author:
Daniel Alievsky

Field Summary
Modifier and Type Field and Description
static ItemListBuilder DEFAULT
          Simplest default implementation of this interface, where newItemList() method just returns new ArrayList<Item>().
 
Method Summary
Modifier and Type Method and Description
 java.util.List<Item> newItemList()
          Creates new list of items.
 

Field Detail

DEFAULT

static final ItemListBuilder DEFAULT
Simplest default implementation of this interface, where newItemList() method just returns new ArrayList<Item>().

Method Detail

newItemList

java.util.List<Item> newItemList()
Creates new list of items.

Returns:
newly created list of items.


Hot at AlgART: HTML для чайников | Trinity for non-Christians | Диалог с Богом | Religion and Geometry