pl.edu.agh.cast.data.model.copier
Class ElementTransferContainer<E extends IElement>

java.lang.Object
  extended by pl.edu.agh.cast.data.model.copier.ElementTransferContainer<E>
Type Parameters:
E - the type of contained elements

public class ElementTransferContainer<E extends IElement>
extends Object

Container for transferring elements to data set. The elements cannot be attached to any data set.

Author:
AGH CAST Team
See Also:
IElement, IDataSet

Constructor Summary
ElementTransferContainer(Type type)
          Constructor.
ElementTransferContainer(Type type, List<E> elements)
          Constructor.
 
Method Summary
 void addElement(E element)
          Adds given element.
 void addElements(Collection<E> elements)
          Adds given collection of elements.
 void addElements(E... elements)
          Adds given elements.
 Type getDataSetType()
          Returns the type of data set (model) from which the contained elements originate.
 List<E> getElements()
          Returns a modifiable list of contained elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementTransferContainer

public ElementTransferContainer(Type type)
Constructor.

Parameters:
type - the type of data set (model) the elements are from

ElementTransferContainer

public ElementTransferContainer(Type type,
                                List<E> elements)
Constructor.

Parameters:
type - the type of data set (model) the elements are from
elements - the list of elements, if null then an emty list is used
Method Detail

getDataSetType

public final Type getDataSetType()
Returns the type of data set (model) from which the contained elements originate.

Returns:
the data set type

getElements

public final List<E> getElements()
Returns a modifiable list of contained elements.

Returns:
modifiable list of elements

addElement

public final void addElement(E element)
Adds given element.

Parameters:
element - element to add

addElements

public final void addElements(E... elements)
Adds given elements.

Parameters:
elements - elements to add

addElements

public final void addElements(Collection<E> elements)
Adds given collection of elements.

Parameters:
elements - collection of elements to add
See Also:
List.addAll(Collection)


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.