Class IndexedObject
- java.lang.Object
-
- org.eclipse.persistence.internal.helper.IndexedObject
-
- All Implemented Interfaces:
Comparable<IndexedObject>
public class IndexedObject extends Object implements Comparable<IndexedObject>
Purpose: A helper class for sorting index/object pairs.
Responsibilities: Allows to sort a list of index/object pairs either directly or with
Collections.sort(List<IndexedObject>)
- usingIndexedObject.compareTo
; or withCollections.sort(List<IndexedObject>, Comparator<IndexedObject>)
- using custom-definedComparator<IndexedObject>
.- See Also:
Collections
,Comparator
,OrderedListContainerPolicy
-
-
Constructor Summary
Constructors Constructor Description IndexedObject(Integer index, Object object)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(IndexedObject anotherIndexedObject)
Integer
getIndex()
Object
getObject()
void
setIndex(Integer index)
void
setObject(Object object)
String
toString()
-
-
-
Method Detail
-
getIndex
public Integer getIndex()
-
setIndex
public void setIndex(Integer index)
-
getObject
public Object getObject()
-
setObject
public void setObject(Object object)
-
compareTo
public int compareTo(IndexedObject anotherIndexedObject)
- Specified by:
compareTo
in interfaceComparable<IndexedObject>
-
-