Package main
Class CompHapSegment
- java.lang.Object
-
- main.CompHapSegment
-
- All Implemented Interfaces:
java.lang.Comparable<CompHapSegment>
public class CompHapSegment extends java.lang.Object implements java.lang.Comparable<CompHapSegment>
Class
CompHapSegmentrepresents a copied haplotype segment in a composite reference haplotype.Instances of class
CompHapSegmentare not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description CompHapSegment(int hap, int step, int compHapIndex)Constructs a newCompHapSegmentfrom the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(CompHapSegment seg)Compares the specified segment tothisfor order.intcompHapIndex()Returns the composite haplotype index.inthap()Returns the copied haplotype.intstep()Returns the last recorded step forthis.hap().voidupdateHap(int hap)Update the copied haplotype to the specified haplotypevoidupdateStep(int step)Updates the step to the specified value
-
-
-
Method Detail
-
updateHap
public void updateHap(int hap)
Update the copied haplotype to the specified haplotype- Parameters:
hap- the new haplotype
-
updateStep
public void updateStep(int step)
Updates the step to the specified value- Parameters:
step- the new step value
-
hap
public int hap()
Returns the copied haplotype.- Returns:
- the copied haplotype
-
step
public int step()
Returns the last recorded step forthis.hap().- Returns:
- the last recorded step for
this.hap()
-
compHapIndex
public int compHapIndex()
Returns the composite haplotype index.- Returns:
- the composite haplotype index
-
compareTo
public int compareTo(CompHapSegment seg)
Compares the specified segment tothisfor order. Returns -1, 0, or 1 according to whetherthis.end()is less than, equal, or greater thanseg.end().- Specified by:
compareToin interfacejava.lang.Comparable<CompHapSegment>- Parameters:
seg- the object to be compared- Returns:
- -1, 0, or 1 according to whether
this.end()is less than, equal, or greater thanseg.end()
-
-