Package org.jparsec

Class Tokens.Fragment

java.lang.Object
org.jparsec.Tokens.Fragment
Enclosing class:
Tokens

public static final class Tokens.Fragment extends Object
Represents a fragment tagged according to its semantics. It's a convenience class so that you don't have to create many classes each for a different token. Instead, you could just use new fragment(text, "token1") to uniquely identify a token by the "token1" tag.
  • Field Details

    • text

      private final String text
    • tag

      private final Object tag
  • Constructor Details

  • Method Details

    • text

      public String text()
      Returns the text of the token value.
    • tag

      public Object tag()
      Returns the tag of the token value.
    • equalFragment

      boolean equalFragment(Tokens.Fragment that)
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object