Package org.jparsec
Class WithSource<T>
- java.lang.Object
-
- org.jparsec.WithSource<T>
-
public final class WithSource<T> extends java.lang.Object
Parsed result with the matched source text.
-
-
Constructor Summary
Constructors Constructor Description WithSource(T value, java.lang.String source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getSource()
Returns the underlying source text.T
getValue()
Returns the parsed result.int
hashCode()
java.lang.String
toString()
Returns the underlying source text.
-
-
-
Field Detail
-
value
private final T value
-
source
private final java.lang.String source
-
-
Constructor Detail
-
WithSource
public WithSource(T value, java.lang.String source)
-
-
Method Detail
-
getValue
public T getValue()
Returns the parsed result.
-
getSource
public java.lang.String getSource()
Returns the underlying source text. Never null.
-
toString
public java.lang.String toString()
Returns the underlying source text.- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-