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
CompHapSegment
represents a copied haplotype segment in a composite reference haplotype.Instances of class
CompHapSegment
are not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description CompHapSegment(int hap, int step, int compHapIndex)
Constructs a newCompHapSegment
from the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(CompHapSegment seg)
Compares the specified segment tothis
for order.int
compHapIndex()
Returns the composite haplotype index.int
hap()
Returns the copied haplotype.int
step()
Returns the last recorded step forthis.hap()
.void
updateHap(int hap)
Update the copied haplotype to the specified haplotypevoid
updateStep(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 tothis
for order. Returns -1, 0, or 1 according to whetherthis.end()
is less than, equal, or greater thanseg.end()
.- Specified by:
compareTo
in 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()
-
-