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
  • Method Details

    • getMeta

      @Nullable public Meta getMeta()
      Returns:
      the meta
    • getSub

      public String getSub()
      Specified by:
      getSub in class AbstractEdge
      Returns:
      The value of the sub attribute
    • getPred

      public String getPred()
      Specified by:
      getPred in class AbstractEdge
      Returns:
      The value of the pred attribute
    • getObj

      public String getObj()
      Specified by:
      getObj in class AbstractEdge
      Returns:
      The value of the obj attribute
    • withMeta

      public final Edge withMeta(@Nullable Meta value)
      Copy the current immutable object by setting a value for the meta attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for meta (can be null)
      Returns:
      A modified copy of the this object
    • withSub

      public final Edge withSub(String value)
      Copy the current immutable object by setting a value for the sub attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sub
      Returns:
      A modified copy of the this object
    • withPred

      public final Edge withPred(String value)
      Copy the current immutable object by setting a value for the pred attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for pred
      Returns:
      A modified copy of the this object
    • withObj

      public final Edge withObj(String value)
      Copy the current immutable object by setting a value for the obj attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for obj
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of Edge that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: meta, sub, pred, obj.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Edge with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static Edge copyOf(AbstractEdge instance)
      Creates an immutable copy of a AbstractEdge value. 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