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
public final class Edge
extends AbstractEdge
An edge connects two nodes via a predicate
- Author:
- cjm
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.geneontology.obographs.core.model.NodeOrEdge
EMPTY_META -
Method Summary
Modifier and TypeMethodDescriptionstatic EdgecopyOf(AbstractEdge instance) Creates an immutable copy of aAbstractEdgevalue.booleanThis instance is equal to all instances ofEdgethat have equal attribute values.getMeta()getObj()getPred()getSub()inthashCode()Computes a hash code from attributes:meta,sub,pred,obj.toString()Prints the immutable valueEdgewith attribute values.final EdgeCopy the current immutable object by setting a value for themetaattribute.final EdgeCopy the current immutable object by setting a value for theobjattribute.final EdgeCopy the current immutable object by setting a value for thepredattribute.final EdgeCopy the current immutable object by setting a value for thesubattribute.Methods inherited from class org.geneontology.obographs.core.model.AbstractEdge
compareTo
-
Method Details
-
getMeta
- Returns:
- the meta
-
getSub
- Specified by:
getSubin classAbstractEdge- Returns:
- The value of the
subattribute
-
getPred
- Specified by:
getPredin classAbstractEdge- Returns:
- The value of the
predattribute
-
getObj
- Specified by:
getObjin classAbstractEdge- Returns:
- The value of the
objattribute
-
withMeta
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
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
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
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
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
Prints the immutable valueEdgewith attribute values. -
copyOf
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
-