Interface DataContainer<T extends DataPoint>

    • Method Detail

      • newComparator

        DataPointComparator<T> newComparator()
        Returns a new instance of the default comparator.
        Returns:
        the comparator instance
      • getComparator

        DataPointComparator<T> getComparator()
        Returns the comparator in use.
        Returns:
        the comparator in use
      • newPoint

        T newPoint()
        Returns a new instance of a DataContainer point.
        Returns:
        the new DataContainer point
      • getHeader

        DataContainer getHeader()
        Returns an empty container with the same payload data as this one.
        Returns:
        a clone of the payload
      • assign

        void assign​(DataContainer<T> other)
        Obtains the stored variables from the other data point, but not the actual data points.
        Parameters:
        other - the data point to get the values from
      • compareToHeader

        int compareToHeader​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - if the specified object's type prevents it from being compared to this object.
      • equalsHeader

        boolean equalsHeader​(Object obj)
        Indicates whether some other container's header is "equal to" this ones.
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • compareToData

        int compareToData​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - if the specified object's type prevents it from being compared to this object.
      • equalsData

        boolean equalsData​(Object obj)
        Indicates whether some other container's header is "equal to" this ones.
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • toList

        List<T> toList()
        Returns a vector with the points.
        Returns:
        a vector with all the points
      • toList

        List<T> toList​(DataPointComparator<T> comparator)
        Returns a list with the points.
        Parameters:
        comparator - the comparator to use
        Returns:
        a list with all the points
      • toTreeSet

        TreeSet<T> toTreeSet()
        Returns a treeset with the points.
        Returns:
        a treeset with all the points
      • toTreeSet

        TreeSet<T> toTreeSet​(DataPointComparator<T> comparator)
        Returns a treeset with the points, sorted according to the given comparator.
        Parameters:
        comparator - the comparator to use
        Returns:
        a treeset with all the points