Class Symbol

java.lang.Object
org.moeaframework.util.grammar.Symbol

public class Symbol extends Object
A context-free grammar symbol.
See Also:
  • Constructor Details

    • Symbol

      public Symbol(String value, boolean isTerminal)
      Constructs a symbol with the specified value.
      Parameters:
      value - the value of this symbol
      isTerminal - true if this symbol is a terminal; false otherwise
  • Method Details

    • getValue

      public String getValue()
      Returns the value of this symbol.
      Returns:
      the value of this symbol
    • isTerminal

      public boolean isTerminal()
      Returns true if this symbol is a terminal; false otherwise.
      Returns:
      true if this symbol is a terminal; false otherwise
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object