public static class SortedTableModel.SortContainer extends java.lang.Object implements java.lang.Comparable<SortedTableModel.SortContainer>
| Constructor and Description |
|---|
SortContainer(java.lang.Comparable<?> value,
int index)
Initializes the container.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SortedTableModel.SortContainer o)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
int |
getIndex()
Returns the original index of the item.
|
java.lang.Comparable<?> |
getValue()
Returns the value to sort on.
|
java.lang.String |
toString()
Returns a string representation of the sort container.
|
public SortContainer(java.lang.Comparable<?> value,
int index)
value - the value to sort onindex - the original indexpublic java.lang.Comparable<?> getValue()
public int getIndex()
public int compareTo(SortedTableModel.SortContainer o)
compareTo in interface java.lang.Comparable<SortedTableModel.SortContainer>o - the object to be compared.java.lang.ClassCastException - if the specified object's type prevents it
from being compared to this object.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare.java.lang.ClassCastException - if the specified object's type prevents it
from being compared to this object.public java.lang.String toString()
toString in class java.lang.Object