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 Summary
Constructors Constructor Description NonPersistentNonOrderedCoexpLink(Long g1, Long g2, boolean b)NonPersistentNonOrderedCoexpLink(Gene2GeneCoexpression link)NonPersistentNonOrderedCoexpLink(Gene g1, Gene g2, boolean b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(NonPersistentNonOrderedCoexpLink o)booleanequals(Object obj)LonggetFirstGene()Gene2GeneCoexpressiongetLink()LonggetSecondGene()inthashCode()booleanisPositiveCorrelation()StringtoString()
-
-
-
Constructor Detail
-
NonPersistentNonOrderedCoexpLink
public NonPersistentNonOrderedCoexpLink(Gene g1, Gene g2, boolean b)
-
NonPersistentNonOrderedCoexpLink
public NonPersistentNonOrderedCoexpLink(Long g1, Long g2, boolean b)
-
NonPersistentNonOrderedCoexpLink
public NonPersistentNonOrderedCoexpLink(Gene2GeneCoexpression link)
-
-
Method Detail
-
compareTo
public int compareTo(NonPersistentNonOrderedCoexpLink o)
- Specified by:
compareToin interfaceComparable<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
-
isPositiveCorrelation
public boolean isPositiveCorrelation()
-
-