|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava3.core.sequence.location.template.AbstractLocation
public abstract class AbstractLocation
Base abstraction of a location which encodes for the majority of important features about a location such as the start, end and strand
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.biojava3.core.sequence.location.template.Location |
---|
Location.Tools |
Field Summary |
---|
Fields inherited from interface org.biojava3.core.sequence.location.template.Location |
---|
EMPTY |
Constructor Summary | |
---|---|
protected |
AbstractLocation()
|
|
AbstractLocation(Point start,
Point end,
Strand strand,
boolean circular,
boolean betweenCompounds,
AccessionID accession,
List<Location> subLocations)
Default constructor |
|
AbstractLocation(Point start,
Point end,
Strand strand,
boolean circular,
boolean betweenCompounds,
List<Location> subLocations)
Default constructor |
Method Summary | ||
---|---|---|
protected void |
assertLocation()
|
|
protected
|
canComplement(Sequence<C> sequence)
Uses the Sequence's CompoundSet to decide if a compound can be assgined to ComplementCompound meaning it can complement |
|
boolean |
equals(Object obj)
|
|
AccessionID |
getAccession()
Returns the AccessionID this location is currently bound with |
|
Point |
getEnd()
End of the location |
|
int |
getLength()
Returns the length of the outer bounds of this location |
|
List<Location> |
getRelevantSubLocations()
Returns the normalised list of sub locations i.e. |
|
|
getRelevantSubSequence(Sequence<C> sequence)
Will return a SequenceReader object which offers a view of all resolved locations i.e. |
|
Point |
getStart()
Start of the location |
|
Strand |
getStrand()
Strand which the location is located on |
|
List<Location> |
getSubLocations()
Gives access to the sub locations for this location. |
|
|
getSubSequence(Sequence<C> sequence)
If circular this will return the sequence represented by the sub locations joined. |
|
int |
hashCode()
|
|
boolean |
isBetweenCompounds()
Returns true if the position is meant to represent a point between two points such as 78^79. |
|
boolean |
isCircular()
Indicates if this location is circular. |
|
boolean |
isComplex()
Returns true if the location is considered to be complex meaning the location is actually composed of sub-locations. |
|
Iterator<Location> |
iterator()
Iterates through all known sub-locations for this location but does not descend |
|
protected
|
reverseSequence(Sequence<C> sequence)
Reverses and (if possible) complements the Sequence so as to represent the reverse strand (if one exists). |
|
protected void |
setAccession(AccessionID accession)
|
|
protected void |
setBetweenCompounds(boolean betweenCompounds)
|
|
protected void |
setCircular(boolean circular)
|
|
protected void |
setEnd(Point end)
|
|
protected void |
setStart(Point start)
|
|
protected void |
setStrand(Strand strand)
|
|
protected void |
setSubLocations(List<Location> subLocations)
|
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected AbstractLocation()
public AbstractLocation(Point start, Point end, Strand strand, boolean circular, boolean betweenCompounds, List<Location> subLocations)
start
- start of the locationend
- end of the locationstrand
- strand it is located oncircular
- Boolean which says if the current location was circular
or notbetweenCompounds
- Indicates the location lies at the position between
a pair of bases; means the bases must be next to each other (and
therefore cannot be complex)subLocations
- Sub locations which composes this locationpublic AbstractLocation(Point start, Point end, Strand strand, boolean circular, boolean betweenCompounds, AccessionID accession, List<Location> subLocations)
start
- start of the locationend
- end of the locationstrand
- strand it is located oncircular
- Boolean which says if the current location was circular
or notbetweenCompounds
- Indicates the location lies at the position between
a pair of bases; means the bases must be next to each other (and
therefore cannot be complex)accession
- The accession ID to link this location tosubLocations
- Sub locations which composes this locationMethod Detail |
---|
protected void assertLocation()
public Point getEnd()
Location
getEnd
in interface Location
public Point getStart()
Location
getStart
in interface Location
public int getLength()
Location
getLength
in interface Location
public Strand getStrand()
Location
getStrand
in interface Location
public List<Location> getSubLocations()
Location
#getAllSubLocations()
.
getSubLocations
in interface Location
public boolean isComplex()
Location
isComplex
in interface Location
public AccessionID getAccession()
Accessioned
getAccession
in interface Accessioned
public Iterator<Location> iterator()
iterator
in interface Iterable<Location>
public List<Location> getRelevantSubLocations()
getRelevantSubLocations
in interface Location
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public boolean isCircular()
Location
isCircular
in interface Location
public boolean isBetweenCompounds()
Location
isBetweenCompounds
in interface Location
public <C extends Compound> Sequence<C> getSubSequence(Sequence<C> sequence)
getSubSequence
in interface Location
sequence
- The sequence object to work with
public <C extends Compound> Sequence<C> getRelevantSubSequence(Sequence<C> sequence)
Location
getRelevantSubSequence
in interface Location
sequence
- The sequence object to work with
protected <C extends Compound> Sequence<C> reverseSequence(Sequence<C> sequence)
protected <C extends Compound> boolean canComplement(Sequence<C> sequence)
public String toString()
toString
in class Object
protected void setCircular(boolean circular)
protected void setEnd(Point end)
protected void setStart(Point start)
protected void setStrand(Strand strand)
protected void setBetweenCompounds(boolean betweenCompounds)
protected void setSubLocations(List<Location> subLocations)
protected void setAccession(AccessionID accession)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |