public class DefaultVPDAlphabet<I> extends AbstractVPDAlphabet<I>
VPDAlphabet
.VPDAlphabet.SymbolType
modCount
Constructor and Description |
---|
DefaultVPDAlphabet(Collection<I> internalSymbols,
Collection<I> callSymbols,
Collection<I> returnSymbols) |
Modifier and Type | Method and Description |
---|---|
I |
getCallSymbol(int index)
The
Alphabet.getSymbol(int) variant for the call alphabet. |
int |
getCallSymbolIndex(I symbol)
The
Alphabet.getSymbolIndex(Object) variant for the call alphabet. |
Collection<I> |
getCallSymbols() |
I |
getInternalSymbol(int index)
The
Alphabet.getSymbol(int) variant for the internal alphabet. |
int |
getInternalSymbolIndex(I symbol)
The
Alphabet.getSymbolIndex(Object) variant for the internal alphabet. |
Collection<I> |
getInternalSymbols() |
int |
getNumCalls() |
int |
getNumInternals() |
int |
getNumReturns() |
I |
getReturnSymbol(int index)
The
Alphabet.getSymbol(int) variant for the return alphabet. |
int |
getReturnSymbolIndex(I symbol)
The
Alphabet.getSymbolIndex(Object) variant for the return alphabet. |
Collection<I> |
getReturnSymbols() |
I |
getSymbol(int index)
Returns the symbol with the given index in this alphabet.
|
int |
getSymbolIndex(I symbol)
Returns the index of the given symbol in the alphabet.
|
VPDAlphabet.SymbolType |
getSymbolType(I symbol) |
int |
size()
The size of this container.
|
getCallAlphabet, getInternalAlphabet, getReturnAlphabet
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
callReturnBalance, isCallMatched, isCallSymbol, isInternalSymbol, isReturnMatched, isReturnSymbol, isWellMatched, longestWellMatchedPrefix, longestWellMatchedSuffix
apply, applyAsInt, compare, containsSymbol, translateFrom, writeToArray
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 DefaultVPDAlphabet(Collection<I> internalSymbols, Collection<I> callSymbols, Collection<I> returnSymbols)
public I getCallSymbol(int index) throws IllegalArgumentException
VPDAlphabet
Alphabet.getSymbol(int)
variant for the call alphabet.IllegalArgumentException
public int getCallSymbolIndex(I symbol) throws IllegalArgumentException
VPDAlphabet
Alphabet.getSymbolIndex(Object)
variant for the call alphabet.IllegalArgumentException
public Collection<I> getCallSymbols()
public I getInternalSymbol(int index) throws IllegalArgumentException
VPDAlphabet
Alphabet.getSymbol(int)
variant for the internal alphabet.IllegalArgumentException
public int getInternalSymbolIndex(I symbol) throws IllegalArgumentException
VPDAlphabet
Alphabet.getSymbolIndex(Object)
variant for the internal alphabet.IllegalArgumentException
public Collection<I> getInternalSymbols()
public I getReturnSymbol(int index) throws IllegalArgumentException
VPDAlphabet
Alphabet.getSymbol(int)
variant for the return alphabet.IllegalArgumentException
public int getReturnSymbolIndex(I symbol) throws IllegalArgumentException
VPDAlphabet
Alphabet.getSymbolIndex(Object)
variant for the return alphabet.IllegalArgumentException
public Collection<I> getReturnSymbols()
public int getNumCalls()
public int getNumInternals()
public int getNumReturns()
public VPDAlphabet.SymbolType getSymbolType(I symbol)
@Nullable public I getSymbol(int index) throws IllegalArgumentException
Alphabet
index
- the index of the requested symbol.IllegalArgumentException
- if there is no symbol with this index.public int getSymbolIndex(@Nullable I symbol) throws IllegalArgumentException
Alphabet
IllegalArgumentException
- if the provided symbol does not belong to the alphabet.public int size()
ArrayWritable
size
in interface Collection<I>
size
in interface List<I>
size
in interface ArrayWritable<I>
size
in class AbstractCollection<I>
Copyright © 2018. All rights reserved.