|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.atunes.utils.RankList<T>
public class RankList<T>
This class represents a Rank: a list of objects, every one with an associate counter. Objects are ordered by this counter. This class is used for statistics
| Constructor Summary | |
|---|---|
RankList()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addItem(T obj)
Adds an object to rank. |
java.lang.Integer |
getCount(T obj)
Returns count for a given object. |
java.util.List<java.lang.Integer> |
getNFirstElementCounts(int n)
Returns the first n elements count of this rank. |
java.util.List<T> |
getNFirstElements(int n)
Returns the first n elements of this rank. |
java.util.List<T> |
getOrder()
Gets the order. |
void |
replaceItem(T oldItem,
T newItem)
Replaces an object, keeping order and count. |
int |
size()
Return the size of rank. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RankList()
| Method Detail |
|---|
public void addItem(T obj)
obj - the objpublic java.lang.Integer getCount(T obj)
obj - the obj
public java.util.List<java.lang.Integer> getNFirstElementCounts(int n)
n - the n
public java.util.List<T> getNFirstElements(int n)
n - the n
public java.util.List<T> getOrder()
public void replaceItem(T oldItem,
T newItem)
oldItem - the old itemnewItem - the new itempublic int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||