Package org.jparsec

Class WithSource<T>

java.lang.Object
org.jparsec.WithSource<T>

public final class WithSource<T> extends Object
Parsed result with the matched source text.
  • Field Details

    • value

      private final T value
    • source

      private final String source
  • Constructor Details

    • WithSource

      public WithSource(T value, String source)
  • Method Details

    • getValue

      public T getValue()
      Returns the parsed result.
    • getSource

      public String getSource()
      Returns the underlying source text. Never null.
    • toString

      public String toString()
      Returns the underlying source text.
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object