Class AbstractVPAlphabet<I>

    • Constructor Detail

      • AbstractVPAlphabet

        public AbstractVPAlphabet​(Alphabet<I> internalAlphabet,
                                  Alphabet<I> callAlphabet,
                                  Alphabet<I> returnAlphabet)
    • Method Detail

      • getCallAlphabet

        public Alphabet<I> getCallAlphabet()
        Description copied from interface: VPAlphabet
        Returns the call symbols of this alphabet as a (sub-) alphabet.
        Specified by:
        getCallAlphabet in interface VPAlphabet<I>
        Returns:
        the call symbols of this alphabet
      • getCallSymbol

        public I getCallSymbol​(int index)
        Description copied from interface: VPAlphabet
        The Alphabet.getSymbol(int) variant for the call alphabet. Note that the index must be relative to the call alphabet and not to this alphabet.
        Specified by:
        getCallSymbol in interface VPAlphabet<I>
        Parameters:
        index - the index of the symbol
        Returns:
        the call symbol at the given index
      • getCallSymbolIndex

        public int getCallSymbolIndex​(I symbol)
        Description copied from interface: VPAlphabet
        The Alphabet.getSymbolIndex(Object) variant for the call alphabet. Note that the index is relative to the call alphabet and not to this alphabet.
        Specified by:
        getCallSymbolIndex in interface VPAlphabet<I>
        Parameters:
        symbol - the symbol whose index should be determined
        Returns:
        the index of the given call symbol
      • getInternalAlphabet

        public Alphabet<I> getInternalAlphabet()
        Description copied from interface: VPAlphabet
        Returns the internal symbols of this alphabet as a (sub-) alphabet.
        Specified by:
        getInternalAlphabet in interface VPAlphabet<I>
        Returns:
        the internal symbols of this alphabet
      • getInternalSymbol

        public I getInternalSymbol​(int index)
        Description copied from interface: VPAlphabet
        The Alphabet.getSymbol(int) variant for the internal alphabet. Note that the index must be relative to the internal alphabet and not to this alphabet.
        Specified by:
        getInternalSymbol in interface VPAlphabet<I>
        Parameters:
        index - the index of the symbol
        Returns:
        the internal symbol at the given index
      • getReturnAlphabet

        public Alphabet<I> getReturnAlphabet()
        Description copied from interface: VPAlphabet
        Returns the return symbols of this alphabet as a (sub-) alphabet.
        Specified by:
        getReturnAlphabet in interface VPAlphabet<I>
        Returns:
        the return symbols of this alphabet
      • getReturnSymbol

        public I getReturnSymbol​(int index)
        Description copied from interface: VPAlphabet
        The Alphabet.getSymbol(int) variant for the return alphabet. Note that the index must be relative to the return alphabet and not to this alphabet.
        Specified by:
        getReturnSymbol in interface VPAlphabet<I>
        Parameters:
        index - the index of the symbol
        Returns:
        the return symbol at the given index
      • getReturnSymbolIndex

        public int getReturnSymbolIndex​(I symbol)
        Description copied from interface: VPAlphabet
        The Alphabet.getSymbolIndex(Object) variant for the return alphabet. Note that the index is relative to the return alphabet and not to this alphabet.
        Specified by:
        getReturnSymbolIndex in interface VPAlphabet<I>
        Parameters:
        symbol - the symbol whose index should be determined
        Returns:
        the index of the given return symbol
      • isCallSymbol

        public boolean isCallSymbol​(I symbol)
        Description copied from interface: VPAlphabet
        Returns whether the given symbol is a call symbol of this alphabet.
        Specified by:
        isCallSymbol in interface VPAlphabet<I>
        Parameters:
        symbol - the symbol to analyze
        Returns:
        true if the given symbol is a call symbol of this alphabet, false otherwise
      • isInternalSymbol

        public boolean isInternalSymbol​(I symbol)
        Description copied from interface: VPAlphabet
        Returns whether the given symbol is an internal symbol of this alphabet.
        Specified by:
        isInternalSymbol in interface VPAlphabet<I>
        Parameters:
        symbol - the symbol to analyze
        Returns:
        true if the given symbol is an internal symbol of this alphabet, false otherwise
      • isReturnSymbol

        public boolean isReturnSymbol​(I symbol)
        Description copied from interface: VPAlphabet
        Returns whether the given symbol is a return symbol of this alphabet.
        Specified by:
        isReturnSymbol in interface VPAlphabet<I>
        Parameters:
        symbol - the symbol to analyze
        Returns:
        true if the given symbol is a return symbol of this alphabet, false otherwise
      • getSymbol

        public I getSymbol​(int index)
        Description copied from interface: Alphabet
        Returns the symbol with the given index in this alphabet.
        Specified by:
        getSymbol in interface Alphabet<I>
        Parameters:
        index - the index of the requested symbol.
        Returns:
        symbol with the given index.
      • getSymbolIndex

        public int getSymbolIndex​(I symbol)
        Description copied from interface: Alphabet
        Returns the index of the given symbol in the alphabet.
        Specified by:
        getSymbolIndex in interface Alphabet<I>
        Parameters:
        symbol - the symbol whose index should be determined
        Returns:
        the index of the given symbol
      • containsSymbol

        public boolean containsSymbol​(I symbol)
        Description copied from interface: Alphabet
        Checks whether the given symbol is part of the alphabet.

        Caution: the default implementation is rather inefficient and should be overridden, if possible.

        Specified by:
        containsSymbol in interface Alphabet<I>
        Parameters:
        symbol - the symbol to check
        Returns:
        true iff the symbol is part of the alphabet