Class DataSet

  • All Implemented Interfaces:
    DataElement, java.lang.Comparable<DataElement>, java.lang.Iterable<DataCase>, java.util.Collection<DataCase>, java.util.List<DataCase>, javolution.lang.Reusable

    public final class DataSet
    extends DataElementList<DataCase>
    Defines a data element called a set. A data set is a collection of runs or cases that make up a single test or set of associated data. Any number of cases may be added to a set.

    Modified by: Joseph A. Huwaldt

    Version:
    October 13, 2015
    Author:
    Joseph A. Huwaldt, Date: March 5, 2003
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DataSet newInstance​(java.lang.CharSequence name)
      Returns a new, preallocated or recycled DataSet instance (on the stack when executing in a StackContext) with the specified name, that can store a list of DataCase objects and any associated user data.
      static void recycle​(DataSet instance)
      Recycles a set instance immediately (on the stack when executing in a StackContext).
      static DataSet valueOf​(java.lang.String name, java.util.Collection<?> cases)
      Return a data set made up of any cases found in the specified collection.
      • Methods inherited from class java.util.AbstractList

        add, addAll, clear, indexOf, lastIndexOf, subList
      • Methods inherited from class java.util.AbstractCollection

        addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
    • Method Detail

      • newInstance

        public static DataSet newInstance​(java.lang.CharSequence name)
        Returns a new, preallocated or recycled DataSet instance (on the stack when executing in a StackContext) with the specified name, that can store a list of DataCase objects and any associated user data.
        Parameters:
        name - The name to be assigned to this set (may not be null).
      • recycle

        public static void recycle​(DataSet instance)
        Recycles a set instance immediately (on the stack when executing in a StackContext).
      • valueOf

        public static DataSet valueOf​(java.lang.String name,
                                      java.util.Collection<?> cases)
        Return a data set made up of any cases found in the specified collection. Any objects that are not DataCase objects in the specified collection will be ignored. If you pass a DataSet object, all the cases found in it will be added to the new set.
        Parameters:
        name - The name to be assigned to this set (may not be null).
        cases - A collection that contains a set of cases.