Class NonPersistentNonOrderedCoexpLink

java.lang.Object
ubic.gemma.persistence.service.association.coexpression.NonPersistentNonOrderedCoexpLink
All Implemented Interfaces:
Comparable<NonPersistentNonOrderedCoexpLink>

public class NonPersistentNonOrderedCoexpLink extends Object implements Comparable<NonPersistentNonOrderedCoexpLink>
Wrapper object used to track and eliminate duplicates. Crucial: for the purposes of "equals" and "hashcode", ignores the ID of the link, and the gene order. Sign is used. Sort order is by ID of the first gene only.
Author:
Paul
  • Constructor Details

    • NonPersistentNonOrderedCoexpLink

      public NonPersistentNonOrderedCoexpLink(Gene g1, Gene g2, boolean b)
    • NonPersistentNonOrderedCoexpLink

      public NonPersistentNonOrderedCoexpLink(Long g1, Long g2, boolean b)
    • NonPersistentNonOrderedCoexpLink

      public NonPersistentNonOrderedCoexpLink(Gene2GeneCoexpression link)
  • Method Details

    • compareTo

      public int compareTo(NonPersistentNonOrderedCoexpLink o)
      Specified by:
      compareTo in interface Comparable<NonPersistentNonOrderedCoexpLink>
    • getFirstGene

      public Long getFirstGene()
      Returns:
      The first gene for the underlying link; this is always the lower ID.
    • getLink

      public Gene2GeneCoexpression getLink()
      Returns:
      The underlying link (may be null depending on how this was constructed)
    • getSecondGene

      public Long getSecondGene()
      Returns:
      The second gene for the underlying link; this is always the higher ID - not necesssarily the secondGene
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isPositiveCorrelation

      public boolean isPositiveCorrelation()