jbil.sequence
Interface Symbol

All Known Subinterfaces:
AtomicSymbol, HighOrderSymbol
All Known Implementing Classes:
AtomicCharSymbol, CharSymbol, HighOrderCharSymbol

public interface Symbol

The unit component of sequences.

Every symbol has a String representation (glyph) which not necessarily has one single character, although within a sequence a symbol is considered as a unit component. That is the String 101112 may be the visual representation of a sequence composed of three symbols whose glyphs are '10', '11', and '12'.

A symbol can 'match' zero, one or more symbols. The number of symbols a particular symbol matches is called its arity. A symbol is said to be atomic it matches itself only (arity=1).

Author:
Paulo G. S. da Fonseca

Method Summary
 int arity()
          The arity of a Symbols corresponds to the number of symbols matching it.
 Alphabet getMatches()
           
 boolean isAtomic()
           
 java.lang.String toString()
           
 

Method Detail

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
The String representation of the Symbol.

getMatches

Alphabet getMatches()
Returns:
The alphabet of symbols matching this symbol.

arity

int arity()
The arity of a Symbols corresponds to the number of symbols matching it.

Returns:
The number of (atomic) symbols matching this symbol.

isAtomic

boolean isAtomic()
Returns:
True if the symbol is atomic, or false, otherwise.