Package org.jparsec
Class WithSource<T>
- java.lang.Object
-
- org.jparsec.WithSource<T>
-
public final class WithSource<T> extends java.lang.ObjectParsed 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 booleanequals(java.lang.Object o)java.lang.StringgetSource()Returns the underlying source text.TgetValue()Returns the parsed result.inthashCode()java.lang.StringtoString()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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-