public final class HGValueLink extends HGPlainLink
HGValueLink
is a HGLink
that can hold an arbitrary
object as payload. The object can be of any type and can be interpreted by the
application, for instance, as a label where it will be usually a String
or a weight, if it is a number. Note that the type of the stored atom will be
the type of wrapped object, not HGValueLink.class
. Thus, if you are wrapping
a Java String as a link, for example, you would query with hg.type(String.class)
rather than hg.type(HGValueLink.class)
.
outgoingSet
Constructor and Description |
---|
HGValueLink() |
HGValueLink(HGHandle... targets) |
HGValueLink(Object value,
HGHandle... targets) |
Modifier and Type | Method and Description |
---|---|
Object |
getValue()
Return the underlying value.
|
void |
setValue(Object value)
Set the underlying value.
|
String |
toString() |
getArity, getTargetAt, iterator, notifyTargetHandleUpdate, notifyTargetRemoved, toStringHdlArr
public HGValueLink()
public HGValueLink(HGHandle... targets)
public void setValue(Object value)
public Object getValue()
public String toString()
toString
in class HGPlainLink
Copyright © 2015. All rights reserved.