SSJ  3.3.1
Stochastic Simulation in Java
Classes | Public Member Functions | List of all members
TransformingList< OE, IE > Class Template Referenceabstract

Represents a list that dynamically transforms the elements of another list. More...

Inheritance diagram for TransformingList< OE, IE >:
[legend]
Collaboration diagram for TransformingList< OE, IE >:
[legend]

Public Member Functions

 TransformingList (List< IE > fromList)
 Creates a new transforming list wrapping the inner list fromList. More...
 
List< IE > getInnerList ()
 
abstract OE convertFromInnerType (IE e)
 Converts an element in the inner list to an element of the outer type. More...
 
abstract IE convertToInnerType (OE e)
 Converts an element of the outer type to an element for the inner list. More...
 
void add (int index, OE element)
 
void clear ()
 
OE get (int index)
 
Iterator< OE > iterator ()
 
ListIterator< OE > listIterator ()
 
ListIterator< OE > listIterator (int index)
 
OE remove (int index)
 
OE set (int index, OE element)
 
int size ()
 

Detailed Description

Represents a list that dynamically transforms the elements of another list.

This abstract class defines a list containing an inner list of elements of a certain type, and provides facilities to convert these inner elements to outer elements of another type. A concrete subclass simply needs to provide methods for converting between the inner and the outer types.

Parameters
<IE>the inner type of the elements.
<OE>the type of the outer elements.

Constructor & Destructor Documentation

◆ TransformingList()

TransformingList ( List< IE >  fromList)

Creates a new transforming list wrapping the inner list fromList.

Parameters
fromListthe inner list.

Member Function Documentation

◆ convertFromInnerType()

abstract OE convertFromInnerType ( IE  e)
abstract

Converts an element in the inner list to an element of the outer type.

Parameters
ethe inner element.
Returns
the outer element.

◆ convertToInnerType()

abstract IE convertToInnerType ( OE  e)
abstract

Converts an element of the outer type to an element for the inner list.

Parameters
ethe outer element.
Returns
the inner element.

The documentation for this class was generated from the following file: