|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.bio.symbol.AbstractLocation
public abstract class AbstractLocation
An abstract implementation of Location.
LocationTools class.| Field Summary |
|---|
| Fields inherited from interface org.biojava.bio.symbol.Location |
|---|
empty, full, naturalOrder |
| Constructor Summary | |
|---|---|
AbstractLocation()
|
|
| Method Summary | |
|---|---|
boolean |
contains(Location l)
Checks if this location contains the other. |
boolean |
equals(Object o)
Checks if this location is equivalent to the other. |
Location |
getDecorator(Class decoratorClass)
Checks the decorator chain for an instance of |
int |
hashCode()
|
Location |
intersection(Location loc)
Returns a Location that contains all points common to both ranges. |
Location |
newInstance(Location loc)
Create a new instance of Location with all of the same decorators as this instance but with the data stored in loc. |
boolean |
overlaps(Location l)
Checks if these two locations overlap, using this location's concept of overlapping. |
Location |
union(Location loc)
Return a Location containing all points in either ranges. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.biojava.bio.symbol.Location |
|---|
blockIterator, contains, getMax, getMin, isContiguous, symbols, translate |
| Constructor Detail |
|---|
public AbstractLocation()
| Method Detail |
|---|
public Location getDecorator(Class decoratorClass)
Location
The default behavior is to return null. If the current object is a
decorator and is an instance of
getDecorator in interface LocationdecoratorClass - the Class to check
public Location newInstance(Location loc)
Locationloc.
The default behavior is to return loc.
newInstance in interface Locationloc - the Location to use as template
public boolean contains(Location l)
LocationAbstractly, a location contains another if every point in the other location is contained within this one.
contains in interface Locationl - the Location to check
public boolean overlaps(Location l)
LocationAbstractly, two locations overlap if they both contain any point.
overlaps in interface Locationl - the Location to check
public Location union(Location loc)
Location
union in interface Locationloc - the Location to union with
public Location intersection(Location loc)
Location
intersection in interface Locationloc - the Location to intersect with
public boolean equals(Object o)
LocationAbstractly, a location is equal to another if for every point in one it is also in the other. This is equivalent to a.contains(b) && b.contains(a). You should call LocationTools.areEqual after casting l to Location.
equals in interface Locationequals in class Objecto - the Object to check
public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||