Package weka.gui
Class SortedTableModel.SortContainer
java.lang.Object
weka.gui.SortedTableModel.SortContainer
- All Implemented Interfaces:
Comparable<SortedTableModel.SortContainer>
- Enclosing class:
- SortedTableModel
public static class SortedTableModel.SortContainer
extends Object
implements Comparable<SortedTableModel.SortContainer>
Helper class for sorting the columns.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares this object with the specified object for order.booleanIndicates whether some other object is "equal to" this one.intgetIndex()Returns the original index of the item.Comparable<?>getValue()Returns the value to sort on.toString()Returns a string representation of the sort container.
-
Constructor Details
-
SortContainer
Initializes the container.- Parameters:
value- the value to sort onindex- the original index
-
-
Method Details
-
getValue
Returns the value to sort on.- Returns:
- the value
-
getIndex
public int getIndex()Returns the original index of the item.- Returns:
- the index
-
compareTo
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. Null is considered smallest. If both values are null, then 0 is returned.- Specified by:
compareToin interfaceComparable<SortedTableModel.SortContainer>- Parameters:
o- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
ClassCastException- if the specified object's type prevents it from being compared to this object.
-
equals
Indicates whether some other object is "equal to" this one.- Overrides:
equalsin classObject- Parameters:
obj- the reference object with which to compare.- Returns:
- true if this object is the same as the obj argument; false otherwise.
- Throws:
ClassCastException- if the specified object's type prevents it from being compared to this object.
-
toString
Returns a string representation of the sort container.
-