Package com.inductiveautomation.rm.base
Class RMTopNSort
java.lang.Object
com.inductiveautomation.rm.base.RMSort
com.inductiveautomation.rm.base.RMTopNSort
- All Implemented Interfaces:
- Archivable,- RMJSONArchiver.GetKeys,- Cloneable,- Comparator
This is a sort subclass to support sorting objects by their relative position in an array of values.
- 
Field SummaryFields inherited from class com.inductiveautomation.rm.base.RMSortCOMPARATOR, ORDER_ASCEND, ORDER_DESCEND, ORDER_INDETERMINATE, ORDER_SAME
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new value sort.RMTopNSort(String aKey, int anOrder, int aCount, boolean includeOthers) Creates a new value sort.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanStandard equals implementation.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.intgetCount()Returns the count.booleanReturns whether to include others.booleangetPad()Returns whether to pad to top N value.voidsetCount(int aCount) Sets the count.voidsetIncludeOthers(boolean includeOthers) Sets whether to include others.voidsetPad(boolean aValue) Sets whether to pad to top N value.toString()Returns a string representation of top n sort.toXML(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.base.RMSortclone, compare, Compare, getJSONKeys, getKey, getOrder, getOrderDefault, getOrderString, setKey, setOrder, setOrderString, sort, sort, sort, sort, sort, sortedList, sortedList, sortedList, toggleOrderMethods inherited from class java.lang.Objectfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparatorreversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
- 
Constructor Details- 
RMTopNSortpublic RMTopNSort()Creates a new value sort.
- 
RMTopNSortCreates a new value sort.
 
- 
- 
Method Details- 
getCountpublic int getCount()Returns the count.
- 
setCountpublic void setCount(int aCount) Sets the count.
- 
getIncludeOtherspublic boolean getIncludeOthers()Returns whether to include others.
- 
setIncludeOtherspublic void setIncludeOthers(boolean includeOthers) Sets whether to include others.
- 
getPadpublic boolean getPad()Returns whether to pad to top N value.
- 
setPadpublic void setPad(boolean aValue) Sets whether to pad to top N value.
- 
equalsStandard equals implementation.- Specified by:
- equalsin interface- Comparator
- Overrides:
- equalsin class- RMSort
 
- 
toXMLXML archival.- Specified by:
- toXMLin interface- Archivable
- Overrides:
- toXMLin class- RMSort
 
- 
fromXMLXML unarchival.- Specified by:
- fromXMLin interface- Archivable
- Overrides:
- fromXMLin class- RMSort
 
- 
toStringReturns a string representation of top n sort.
 
-