Documentation of 'info.monitorenter.gui.chart.traces.Trace2DSorted' Java class
Trace2DSorted
info.monitorenter.gui.chart.traces

Class Trace2DSorted

  • All Implemented Interfaces:
    ITrace2D, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Comparable<ITrace2D>, java.util.EventListener
    Direct Known Subclasses:
    Trace2DLtdSorted


    public class Trace2DSorted
    extends ATrace2D
    implements ITrace2D
    Has the behavior of Trace2DReplacing and additional features.

    • All traceoints added whose x- values are not already contained are added to the internal Tree ordered by growing x-values. Therefore it is guaranteed that the tracepoints will be sorted in ascending order of x- values at any time.

    Because sorted insertion of a List causes n! index- operations ( get(int i)) additional to the comparisons this class does not extend Trace2DSimple which uses a List. Instead a TreeSet is used.

    See Also:
    Serialized Form
    • Constructor Detail

      • Trace2DSorted

        public Trace2DSorted()
        Defcon.

    • Method Detail

      • getMaxSize

        public int getMaxSize()
        Description copied from interface: ITrace2D

        Returns the maximum amount of TracePoint2D instances that may be added. For implementations that limit the maximum amount this is a reasonable amount. Non-limiting implementations should return Integer.MAX_VALUE. This allows to detect the unlimitedness. Of course no implementation could store that amount of points.

        Specified by:
        getMaxSize in interface ITrace2D
        Returns:
        The maximum amount of TracePoint2D instances that may be added.
        See Also:
        ITrace2D.getMaxSize()
      • iterator

        public java.util.Iterator<ITracePoint2D> iterator()
        Description copied from interface: ITrace2D
        Returns an Iterator over the internal TracePoint2D instances.

        Implementations should be synchronized. This method is meant to allow modifications of the intenal TracePoint2D instances, so the original points should be returned.

        There is no guarantee that changes made to the contained tracepoints will be reflected in the display immediately. The order the iterator returns the TracePoint2D instances decides how the Chart2D will paint the trace.

        Specified by:
        iterator in interface ITrace2D
        Returns:
        an Iterator over the internal TracePoint2D instances.
        See Also:
        ITrace2D.iterator()

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.