Class DataPositionComparator

java.lang.Object
org.scictrl.mp.orbitcorrect.accessories.DataPositionComparator
All Implemented Interfaces:
Comparator<SimpleData>

public class DataPositionComparator extends Object implements Comparator<SimpleData>
DataPositionComparator is implementation of java.util.Comparator and it is used to compare its two arguments for order.It is used to order storage ring elements, as the beam sees them.They are ordered by the position of that elements.
Author:
igor@scictrl.com
See Also:
  • Constructor Details

    • DataPositionComparator

      public DataPositionComparator()
      OpticsPositionComparator constructor.
  • Method Details

    • compare

      public int compare(SimpleData arg1, SimpleData arg2)
      Compares two arguments and returns -1, 0, 1 as the first argument is before the, at the same position as, or after the second.Arguments are ment as storage ring elements.
      Specified by:
      compare in interface Comparator<SimpleData>