Class RMTopNSort

java.lang.Object
com.inductiveautomation.rm.base.RMSort
com.inductiveautomation.rm.base.RMTopNSort
All Implemented Interfaces:
Archivable, RMJSONArchiver.GetKeys, Cloneable, Comparator

public class RMTopNSort extends RMSort
This is a sort subclass to support sorting objects by their relative position in an array of values.
  • Constructor Details

    • RMTopNSort

      public RMTopNSort()
      Creates a new value sort.
    • RMTopNSort

      public RMTopNSort(String aKey, int anOrder, int aCount, boolean includeOthers)
      Creates a new value sort.
  • Method Details

    • getCount

      public int getCount()
      Returns the count.
    • setCount

      public void setCount(int aCount)
      Sets the count.
    • getIncludeOthers

      public boolean getIncludeOthers()
      Returns whether to include others.
    • setIncludeOthers

      public void setIncludeOthers(boolean includeOthers)
      Sets whether to include others.
    • getPad

      public boolean getPad()
      Returns whether to pad to top N value.
    • setPad

      public void setPad(boolean aValue)
      Sets whether to pad to top N value.
    • equals

      public boolean equals(Object anObj)
      Standard equals implementation.
      Specified by:
      equals in interface Comparator
      Overrides:
      equals in class RMSort
    • toXML

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
      Specified by:
      toXML in interface Archivable
      Overrides:
      toXML in class RMSort
    • fromXML

      public Object fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Specified by:
      fromXML in interface Archivable
      Overrides:
      fromXML in class RMSort
    • toString

      public String toString()
      Returns a string representation of top n sort.
      Overrides:
      toString in class RMSort