public class OriginTrackedValue extends java.lang.Object implements OriginProvider
Object
value and Origin
.of(Object)
,
of(Object, Origin)
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Origin |
getOrigin()
Return the source origin or
null if the origin is not known. |
java.lang.Object |
getValue()
Return the tracked value.
|
int |
hashCode() |
static OriginTrackedValue |
of(java.lang.Object value) |
static OriginTrackedValue |
of(java.lang.Object value,
Origin origin)
|
java.lang.String |
toString() |
public java.lang.Object getValue()
public Origin getOrigin()
OriginProvider
null
if the origin is not known.getOrigin
in interface OriginProvider
null
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static OriginTrackedValue of(java.lang.Object value)
public static OriginTrackedValue of(java.lang.Object value, Origin origin)
OriginTrackedValue
containing the specified value
and
origin
. If the source value implements CharSequence
then so will
the resulting OriginTrackedValue
.value
- the source valueorigin
- the originOriginTrackedValue
or null
if the source value was
null
.