Class Edge
- java.lang.Object
-
- org.geneontology.obographs.core.model.AbstractEdge
-
- org.geneontology.obographs.core.model.Edge
-
- All Implemented Interfaces:
Comparable<AbstractEdge>,NodeOrEdge
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class Edge extends AbstractEdge
An edge connects two nodes via a predicate- Author:
- cjm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEdge.BuilderBuilds instances of typeEdge.
-
Field Summary
-
Fields inherited from interface org.geneontology.obographs.core.model.NodeOrEdge
EMPTY_META
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EdgecopyOf(AbstractEdge instance)Creates an immutable copy of aAbstractEdgevalue.booleanequals(Object another)This instance is equal to all instances ofEdgethat have equal attribute values.MetagetMeta()StringgetObj()StringgetPred()StringgetSub()inthashCode()Computes a hash code from attributes:meta,sub,pred,obj.StringtoString()Prints the immutable valueEdgewith attribute values.EdgewithMeta(Meta value)Copy the current immutable object by setting a value for themetaattribute.EdgewithObj(String value)Copy the current immutable object by setting a value for theobjattribute.EdgewithPred(String value)Copy the current immutable object by setting a value for thepredattribute.EdgewithSub(String value)Copy the current immutable object by setting a value for thesubattribute.-
Methods inherited from class org.geneontology.obographs.core.model.AbstractEdge
compareTo
-
-
-
-
Method Detail
-
getMeta
@Nullable public Meta getMeta()
- Returns:
- the meta
-
getSub
public String getSub()
- Specified by:
getSubin classAbstractEdge- Returns:
- The value of the
subattribute
-
getPred
public String getPred()
- Specified by:
getPredin classAbstractEdge- Returns:
- The value of the
predattribute
-
getObj
public String getObj()
- Specified by:
getObjin classAbstractEdge- Returns:
- The value of the
objattribute
-
withMeta
public final Edge withMeta(@Nullable Meta value)
Copy the current immutable object by setting a value for themetaattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for meta (can benull)- Returns:
- A modified copy of the
thisobject
-
withSub
public final Edge withSub(String value)
Copy the current immutable object by setting a value for thesubattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sub- Returns:
- A modified copy of the
thisobject
-
withPred
public final Edge withPred(String value)
Copy the current immutable object by setting a value for thepredattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for pred- Returns:
- A modified copy of the
thisobject
-
withObj
public final Edge withObj(String value)
Copy the current immutable object by setting a value for theobjattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for obj- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofEdgethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:meta,sub,pred,obj.
-
toString
public String toString()
Prints the immutable valueEdgewith attribute values.
-
copyOf
public static Edge copyOf(AbstractEdge instance)
Creates an immutable copy of aAbstractEdgevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Edge instance
-
-