Class AbstractArrayStatistic<T extends Serializable>

    • Constructor Detail

      • AbstractArrayStatistic

        public AbstractArrayStatistic()
    • Method Detail

      • clear

        public void clear()
        Removes all data currently stored.
      • size

        public int size()
        Returns the number of arrays stored.
        Returns:
        the number of arrays
      • add

        public void add​(T[] data)
        Adds the array at the end.
        Parameters:
        data - the array to add
      • get

        public T[] get​(int index)
        Returns the array at the specified location.
        Parameters:
        index - the index of the array
        Returns:
        the array
      • set

        public T[] set​(int index,
                       T[] data)
        Replaces the array at the specified location.
        Parameters:
        index - the index of the array
        data - the new array
        Returns:
        the old array
      • remove

        public T[] remove​(int index)
        Removes the array at the specified location.
        Parameters:
        index - the index of the array
        Returns:
        the deleted array
      • getMin

        public abstract int getMin()
        Returns the minimum number of arrays that need to be present. -1 for unbounded.
        Returns:
        the minimum number, -1 for unbounded
      • getMax

        public abstract int getMax()
        Returns the maximum number of arrays that need to be present. -1 for unbounded.
        Returns:
        the maximum number, -1 for unbounded
      • checkEqualLength

        protected void checkEqualLength()
        Checks whether all the arrays have the same length.
      • check

        protected void check()
        Checks whether all pre-conditions are met. Throws an IllegalStateException otherwise.
      • toString

        public String toString()
        Returns a string representation of the current setup.
        Overrides:
        toString in class AbstractOptionHandler
        Returns:
        the string representation
      • shallowCopy

        public AbstractArrayStatistic shallowCopy​(boolean expand)
        Returns a shallow copy of itself, i.e., based on the commandline options.
        Specified by:
        shallowCopy in interface ShallowCopySupporter<T extends Serializable>
        Parameters:
        expand - whether to expand variables to their current values
        Returns:
        the shallow copy
      • getStatistics

        public static String[] getStatistics()
        Returns a list with classnames of statistics.
        Returns:
        the statistic classnames
      • forName

        public static AbstractArrayStatistic forName​(String classname,
                                                     String[] options)
        Instantiates the statistic with the given options.
        Parameters:
        classname - the classname of the statistic to instantiate
        options - the options for the statistic
        Returns:
        the instantiated statistic or null if an error occurred
      • forCommandLine

        public static AbstractArrayStatistic forCommandLine​(String cmdline)
        Instantiates the statistic from the given commandline (i.e., classname and optional options).
        Parameters:
        cmdline - the classname (and optional options) of the statistic to instantiate
        Returns:
        the instantiated statistic or null if an error occurred