Class RMTopNSort

  • All Implemented Interfaces:
    Archivable, RMJSONArchiver.GetKeys, java.lang.Cloneable, java.util.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 Detail

      • RMTopNSort

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

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

      • 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​(java.lang.Object anObj)
        Standard equals implementation.
        Specified by:
        equals in interface java.util.Comparator
        Overrides:
        equals in class RMSort
      • toString

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