Package org.jparsec

Class Tokens.Fragment

  • Enclosing class:
    Tokens

    public static final class Tokens.Fragment
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object tag  
      private java.lang.String text  
    • Constructor Summary

      Constructors 
      Constructor Description
      Fragment​(java.lang.String text, java.lang.Object tag)
      Deprecated.
      Use Tokens.fragment() instead.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) boolean equalFragment​(Tokens.Fragment that)  
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.Object tag()
      Returns the tag of the token value.
      java.lang.String text()
      Returns the text of the token value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • text

        private final java.lang.String text
      • tag

        private final java.lang.Object tag
    • Constructor Detail

      • Fragment

        @Deprecated
        public Fragment​(java.lang.String text,
                        java.lang.Object tag)
        Deprecated.
        Use Tokens.fragment() instead.
    • Method Detail

      • text

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

        public java.lang.Object tag()
        Returns the tag of the token value.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object