Class EquivalentNodesSet

java.lang.Object
org.geneontology.obographs.core.model.axiom.AbstractEquivalentNodesSet
org.geneontology.obographs.core.model.axiom.EquivalentNodesSet
All Implemented Interfaces:
Comparable<AbstractEquivalentNodesSet>, Axiom

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class EquivalentNodesSet extends AbstractEquivalentNodesSet
A set of nodes that all stand in a mutual equivalence or identity relationship to one another

Corresponds to Node in the OWLAPI

Author:
cjm
  • Method Details

    • getMeta

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

      public String getRepresentativeNodeId()
      Overrides:
      getRepresentativeNodeId in class AbstractEquivalentNodesSet
      Returns:
      the representativeNodeId
    • getNodeIds

      public Set<String> getNodeIds()
      Specified by:
      getNodeIds in class AbstractEquivalentNodesSet
      Returns:
      the nodeIds
    • withMeta

      public final EquivalentNodesSet 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
    • withRepresentativeNodeId

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

      public final EquivalentNodesSet withNodeIds(String... elements)
      Copy the current immutable object with elements that replace the content of nodeIds.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withNodeIds

      public final EquivalentNodesSet withNodeIds(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of nodeIds. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of nodeIds elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of EquivalentNodesSet 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, representativeNodeId, nodeIds.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static EquivalentNodesSet copyOf(AbstractEquivalentNodesSet instance)
      Creates an immutable copy of a AbstractEquivalentNodesSet 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 EquivalentNodesSet instance