|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Radix
Extracts a radix representation -- a sequence of digits -- from objects. Radix representations allow certain sorting and lookup algorithms which are more efficient in large cases than those which are possible with comparison alone.
| Maturity: All the radix utilities in innig-util are completely experimental. They mostly work, but perform poorly. They may stay; they may improve; they may go away. |
| Plans: Experiment. |
InnigCollections.radixSort(List,Radix),
RadixMap| Method Summary | |
|---|---|
int |
digit(java.lang.Object o,
int position)
Returns the digits of the radix representation of the given object. |
int |
getBase()
Returns the base (the number of digit values) in this radix. |
int |
getMaxPosition(java.lang.Object o)
Returns the position of the most significant digit for this radix. |
int |
getMaxPositionForAll(java.util.Collection values)
Returns the hightest position of the most significant digit of any of the values in the collection. |
int |
getMinPosition(java.lang.Object o)
Returns the position of the most significant digit for this radix. |
int |
getMinPositionForAll(java.util.Collection values)
Returns the lowest position of the least significant digit of any of the values in the collection. |
java.lang.Object |
objectFromDigits(int[] digits)
Constructs an object from the given digits (optional operation). |
java.lang.Object |
objectFromDigits(int[] digits,
int offset,
int len)
Constructs an object from the given digits (optional operation). |
| Methods inherited from interface java.util.Comparator |
|---|
compare, equals |
| Method Detail |
|---|
int getBase()
int digit(java.lang.Object o,
int position)
o - An object from which this radix can extract digits.position - A digit position within o.
java.lang.ClassCastException - if this radix doesn't handle the given object.int getMaxPosition(java.lang.Object o)
java.lang.ClassCastException - if this radix doesn't handle the objectint getMinPosition(java.lang.Object o)
java.lang.ClassCastException - if this radix doesn't handle the objectint getMaxPositionForAll(java.util.Collection values)
java.lang.ClassCastException - if this radix doesn't handle an object
in the collection. This exception is not guaranteed to be thrown if
the list contains an unhandled object, since some implementations may not
actually scan the values.int getMinPositionForAll(java.util.Collection values)
java.lang.ClassCastException - if this radix doesn't handle an object
in the collection. This exception is not guaranteed to be thrown if
the list contains an unhandled object, since some implementations may not
actually scan the values.java.lang.Object objectFromDigits(int[] digits)
getMaxPosition(Object).
java.lang.UnsupportedOperationException - if this radix doesn't support this method.
java.lang.IllegalArgumentException - if any of the digits exceed the base,
any digits are negative, the number of digits is too large, or the digits
don't represent a valid object.
java.lang.Object objectFromDigits(int[] digits,
int offset,
int len)
getMaxPosition(Object).
java.lang.UnsupportedOperationException - if this radix doesn't support this method.
java.lang.IllegalArgumentException - if any of the digits exceed the base,
any digits are negative, the number of digits is too large, or the digits
don't represent a valid object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||