com.datumbox.framework.common.dataobjects
Class AbstractDataStructureCollection<T extends java.util.Collection<?>>
- java.lang.Object
-
- com.datumbox.framework.common.dataobjects.AbstractDataStructure<T>
-
- com.datumbox.framework.common.dataobjects.AbstractDataStructureCollection<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AbstractDataStructureList, FlatDataCollection
public abstract class AbstractDataStructureCollection<T extends java.util.Collection<?>> extends AbstractDataStructure<T>
Abstract class for every AbstractDataStructure which internally uses a Collection Object.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AbstractDataStructureCollection(T data)Public constructor which takes as argument the appropriate Java collection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclear()Clears the internal data.booleancontains(java.lang.Object o)Checks whether the provided object is contained in the internal data.booleanisEmpty()Checks if the internal data are empty.java.util.Iterator<java.lang.Double>iteratorDouble()Iterator which casts the values of the Data Structure from Object to Double.intsize()Returns the size of the collection.java.lang.Object[]toArray()Returns a copy of the internal data as an Array.
-
-
-
Constructor Detail
-
AbstractDataStructureCollection
public AbstractDataStructureCollection(T data)
Public constructor which takes as argument the appropriate Java collection.- Parameters:
data-
-
-
Method Detail
-
size
public final int size()
Returns the size of the collection.- Returns:
-
clear
public final void clear()
Clears the internal data.
-
isEmpty
public final boolean isEmpty()
Checks if the internal data are empty.- Returns:
-
toArray
public final java.lang.Object[] toArray()
Returns a copy of the internal data as an Array. Note that this method copies the data, so its use must be avoided.- Returns:
-
contains
public final boolean contains(java.lang.Object o)
Checks whether the provided object is contained in the internal data.- Parameters:
o-- Returns:
-
iteratorDouble
public final java.util.Iterator<java.lang.Double> iteratorDouble()
Iterator which casts the values of the Data Structure from Object to Double. This iterator should be used only when the underling Data Structure contains Numeric or Boolean values. Accessing this iterator when other data types are stored will lead to an Exception.- Returns:
-
-
DataMelt 3.0 © DataMelt by jWork.ORG