public class EnumAlphabet<E extends Enum<E>> extends ArrayAlphabet<E>
symbols
modCount
Constructor and Description |
---|
EnumAlphabet(Class<E> enumClazz,
boolean withNull) |
Modifier and Type | Method and Description |
---|---|
int |
compare(E o1,
E o2) |
int |
getSymbolIndex(E symbol)
Returns the index of the given symbol in the alphabet.
|
getSymbol, size, writeToArray
get
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
public EnumAlphabet(Class<E> enumClazz, boolean withNull)
public int getSymbolIndex(E symbol) throws IllegalArgumentException
Alphabet
getSymbolIndex
in interface Alphabet<E extends Enum<E>>
getSymbolIndex
in class ArrayAlphabet<E extends Enum<E>>
IllegalArgumentException
- if the provided symbol does not belong to the alphabet.Copyright © 2015. All Rights Reserved.