Documentation of 'com.datumbox.framework.common.dataobjects.FlatDataList' Java class
FlatDataList
com.datumbox.framework.common.dataobjects

Class FlatDataList

  • All Implemented Interfaces:
    Copyable<FlatDataList>, java.io.Serializable, java.lang.Iterable<java.lang.Object>


    public class FlatDataList
    extends AbstractDataStructureList<java.util.List<java.lang.Object>>
    implements java.lang.Iterable<java.lang.Object>, Copyable<FlatDataList>
    The FlatDataList is a data structure that stores internally a List<Object>. The class provides a set of useful methods to access and modify the contents of the collection.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      FlatDataList()
      Default constructor which initializes the internal data with an ArrayList.
      FlatDataList(java.util.List<java.lang.Object> internalData)
      Constructor that initializes the internal data with the provided list.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean add(java.lang.Object e)
      Appends the specified element to the end of the internal list.
      boolean addAll(java.util.Collection<java.lang.Object> c)
      Adds all the elements of the provided collection in the internal list.
      FlatDataList copy()
      Copies itself and returns a new instance of the same type.
      boolean equals(java.lang.Object o)
      java.lang.Object get(int index)
      Gets an element at the specified position in the internal list.
      java.lang.Double getDouble(int index)
      Gets an element at the specified position in this list, converts it into Double and returns its value.
      int hashCode()
      java.util.Iterator<java.lang.Object> iterator()
      java.lang.Object remove(int index)
      Removes an element at the specified position in the internal list and returns it.
      java.lang.Object set(int index, java.lang.Object element)
      Replaces the element at the specified position in the internal list with the specified element and returns the previous value.
      FlatDataCollection toFlatDataCollection()
      Returns a FlatDataCollection with the values of the internal list without coping the data.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • FlatDataList

        public FlatDataList()
        Default constructor which initializes the internal data with an ArrayList.
      • FlatDataList

        public FlatDataList(java.util.List<java.lang.Object> internalData)
        Constructor that initializes the internal data with the provided list.
        Parameters:
        internalData -
    • Method Detail

      • remove

        public final java.lang.Object remove(int index)
        Removes an element at the specified position in the internal list and returns it.
        Parameters:
        index -
        Returns:
      • get

        public final java.lang.Object get(int index)
        Gets an element at the specified position in the internal list.
        Parameters:
        index -
        Returns:
      • getDouble

        public final java.lang.Double getDouble(int index)
        Gets an element at the specified position in this list, converts it into Double and returns its value. The value must be numeric or boolean or else an exception is thrown.
        Parameters:
        index -
        Returns:
      • add

        public final boolean add(java.lang.Object e)
        Appends the specified element to the end of the internal list.
        Parameters:
        e -
        Returns:
      • set

        public final java.lang.Object set(int index,
                                          java.lang.Object element)
        Replaces the element at the specified position in the internal list with the specified element and returns the previous value.
        Parameters:
        index -
        element -
        Returns:
      • addAll

        public final boolean addAll(java.util.Collection<java.lang.Object> c)
        Adds all the elements of the provided collection in the internal list.
        Parameters:
        c -
        Returns:
      • iterator

        public final java.util.Iterator<java.lang.Object> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.Object>
      • toFlatDataCollection

        public final FlatDataCollection toFlatDataCollection()
        Returns a FlatDataCollection with the values of the internal list without coping the data.
        Returns:
      • equals

        public boolean equals(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.