|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Public Member Functions | |
| Counted (E element, int count) | |
| int | getCount () |
| E | getElement () |
| int | compareTo (Counted< E > o) |
Static Public Member Functions | |
| static< E > Comparator < Counted< E > > | getDescendingComparator () |
Private Attributes | |
| final E | element |
| final Integer | count |
Represents an object being counted, with the associated count.
| joshua.util.Counted< E >.Counted | ( | E | element, |
| int | count | ||
| ) |
Constructs an object wrapping an element and its associated count.
| element | An element being counted |
| count | The count associated with the element |
Compares this object to another counted object, according to the natural order of the counts associated with each object.
| o | Another counted object |
| int joshua.util.Counted< E >.getCount | ( | ) |
Gets the count associated with this object's element.
| static <E> Comparator<Counted<E> > joshua.util.Counted< E >.getDescendingComparator | ( | ) | [static] |
Gets a comparator that compares two counted objects based on the reverse of the natural order of the counts associated with each object.
| <E> |
| E joshua.util.Counted< E >.getElement | ( | ) |
Gets the element associated with this object.
final Integer joshua.util.Counted< E >.count [private] |
The count associated with the element.
final E joshua.util.Counted< E >.element [private] |
The element being counted.