org.biojava.dasobert.feature
Class AbstractSegment

java.lang.Object
  extended by org.biojava.dasobert.feature.AbstractSegment
All Implemented Interfaces:
Cloneable, Segment
Direct Known Subclasses:
HistogramSegment, SegmentImpl

public abstract class AbstractSegment
extends Object
implements Segment, Cloneable


Constructor Summary
AbstractSegment()
           
 
Method Summary
abstract  Object clone()
           
 Color getColor()
           
 int getEnd()
           
 String getName()
           
 String getNote()
           
 FeatureTrack getParent()
           
 int getStart()
           
 String getTxtColor()
           
 boolean overlaps(int seqPosition)
          returns true if the specified sequence position is within the range of this Segment
 boolean overlaps(Segment segment)
          tests if two segments are overlapping
 void setColor(Color col)
           
 void setEnd(int ed)
           
 void setName(String nam)
           
 void setNote(String note)
           
 void setParent(FeatureTrack f)
           
 void setStart(int strt)
           
 void setTxtColor(String str)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSegment

public AbstractSegment()
Method Detail

clone

public abstract Object clone()
Specified by:
clone in interface Segment
Overrides:
clone in class Object

toString

public String toString()
Specified by:
toString in interface Segment
Overrides:
toString in class Object

getNote

public String getNote()
Specified by:
getNote in interface Segment

setNote

public void setNote(String note)
Specified by:
setNote in interface Segment

setStart

public void setStart(int strt)
Specified by:
setStart in interface Segment

getStart

public int getStart()
Specified by:
getStart in interface Segment

setEnd

public void setEnd(int ed)
Specified by:
setEnd in interface Segment

getEnd

public int getEnd()
Specified by:
getEnd in interface Segment

setName

public void setName(String nam)
Specified by:
setName in interface Segment

getName

public String getName()
Specified by:
getName in interface Segment

setColor

public void setColor(Color col)
Specified by:
setColor in interface Segment

getColor

public Color getColor()
Specified by:
getColor in interface Segment

setParent

public void setParent(FeatureTrack f)
Specified by:
setParent in interface Segment

getParent

public FeatureTrack getParent()
Specified by:
getParent in interface Segment

setTxtColor

public void setTxtColor(String str)
Specified by:
setTxtColor in interface Segment

getTxtColor

public String getTxtColor()
Specified by:
getTxtColor in interface Segment

overlaps

public boolean overlaps(int seqPosition)
Description copied from interface: Segment
returns true if the specified sequence position is within the range of this Segment

Specified by:
overlaps in interface Segment
Parameters:
seqPosition - the position to check
Returns:
true if seqPos >= start && seqPos <= end

overlaps

public boolean overlaps(Segment segment)
Description copied from interface: Segment
tests if two segments are overlapping

Specified by:
overlaps in interface Segment
Parameters:
segment - to compare with
Returns:
true if segments overlap