ca.cas.montecarlo
Class Break

java.lang.Object
  extended by ca.cas.montecarlo.Break

public class Break
extends java.lang.Object

Each Break object represents a double strand break on a Chromosome object


Constructor Summary
Break(Chromosome chrom, long loc)
          Constructs a Break object
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares the specified object with this break for equality.
 Chromosome getChromosome()
          Returns the chromosome on which this double strand break occurs
 long getLocation()
          Returns the location of this double strand break on the chromosome in which it resides.
static void main(java.lang.String[] args)
           
 java.lang.String toString()
          Returns a String representation of this Break object in the form:
"[name of chromosome]-[homologue of chromosome]:[location of the break]"
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Break

public Break(Chromosome chrom,
             long loc)
      throws java.lang.Exception
Constructs a Break object

Parameters:
chrom - the Chromosome object in which the double strand break occurs
loc - the location of the double strand break on chrom. Supposing chrom is n base pairs long, valid values of loc are 1 to n-1. For example, a value i for loc would represent a break between the (i-1)th and the ith base pairs on chrom
Throws:
java.lang.Exception - if loc is not a valid location for a break on chrom
Method Detail

getChromosome

public Chromosome getChromosome()
Returns the chromosome on which this double strand break occurs

Returns:
the Chromosome object which represents the chromosome on which this double strand break occurs

getLocation

public long getLocation()
Returns the location of this double strand break on the chromosome in which it resides.

Returns:
a long

toString

public java.lang.String toString()
Returns a String representation of this Break object in the form:
"[name of chromosome]-[homologue of chromosome]:[location of the break]"

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this Break object

equals

public boolean equals(java.lang.Object o)
Compares the specified object with this break for equality. Returns true if and only if the specified object is a break and both breaks refer to the same location on the same chromosome.

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to be compared for equality with this break.
Returns:
true if the specified object is equal to this break.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception