public class IndexedId extends Object implements Comparable<IndexedId>
Constructor and Description |
---|
IndexedId(long id,
int index) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(IndexedId that) |
boolean |
equals(Object o) |
long |
getId() |
int |
getIndex() |
int |
hashCode() |
static IndexedId[] |
invert(IndexedId[] ids)
Invert the mapping between sort indices (given by the array order)
and natural indices (given by
getIndex() . |
static long[] |
toSortedIds(IndexedId[] indexedSongIds)
Extracts those ids that belong to an index >=0 and returns them in the order
of the (positive) indices.
|
String |
toString() |
public long getId()
public int getIndex()
public static long[] toSortedIds(IndexedId[] indexedSongIds)
indexedSongIds
- indexed song idspublic static IndexedId[] invert(IndexedId[] ids)
getIndex()
.ids
- indexed song idspublic int compareTo(IndexedId that)
compareTo
in interface Comparable<IndexedId>
Copyright © 2006–2017 tagtraum industries incorporated. All rights reserved.