Class Trace2DReplacing

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

    public class Trace2DReplacing
    extends Trace2DSimple
    Has the behavior of Trace2DBijective and additional features.

    • All tracepoints that are added are stored unchanged in a LinkedList.
    • All traceoints added whose x- values are not already contained are added to the end.
    • If a tracepoint is inserted whose x - value already exists in the List, the old tracepoint with that value will be replaced by the new tracepoint.

    Version:
    $Revision: 1.12 $
    Author:
    Achim Westermann
    See Also:
    Trace2DBijective, Serialized Form
    • Constructor Detail

      • Trace2DReplacing

        public Trace2DReplacing()
        Defcon.
    • Method Detail

      • addPointInternal

        public boolean addPointInternal​(ITracePoint2D p)
        In case p has an x- value already contained, the old tracepoint with that value will be replaced by the new one. Else the new tracepoint will be added to the end, not caring wether tracepoints with a higher x- value are contained.

        Overrides:
        addPointInternal in class Trace2DSimple
        Parameters:
        p - the point to add.
        Returns:
        true if the point wathe maximum amount of points that will be showns successfully added.
        See Also:
        ATrace2D.addPointInternal(info.monitorenter.gui.chart.ITracePoint2D)