public static class SortedTableModel.SortContainer extends Object implements Comparable<SortedTableModel.SortContainer>
Constructor and Description |
---|
SortedTableModel.SortContainer(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(Object obj)
Indicates whether some other object is "equal to" this one.
|
int |
getIndex()
Returns the original index of the item.
|
Comparable |
getValue()
Returns the value to sort on.
|
String |
toString()
Returns a string representation of the sort container.
|
public SortedTableModel.SortContainer(Comparable value, int index)
value
- the value to sort onindex
- the original indexpublic Comparable getValue()
public int getIndex()
public int compareTo(SortedTableModel.SortContainer o)
compareTo
in interface Comparable<SortedTableModel.SortContainer>
o
- the object to be compared.ClassCastException
- if the specified object's type prevents it
from being compared to this object.public boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare.ClassCastException
- if the specified object's type prevents it
from being compared to this object.Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.