public abstract class AbstractLocation extends Object implements Location, Serializable
Location
.
This provides implementations of the binary operators which delegate to
the LocationTools
class.empty, full, naturalOrder
Constructor and Description |
---|
AbstractLocation() |
Modifier and Type | Method and Description |
---|---|
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.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
blockIterator, contains, getMax, getMin, isContiguous, symbols, translate
public AbstractLocation()
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 Location
decoratorClass
- the Class to checkpublic Location newInstance(Location loc)
Location
loc
.
The default behavior is to return loc
.
newInstance
in interface Location
loc
- the Location to use as templatepublic boolean contains(Location l)
Location
Abstractly, a location contains another if every point in the other location is contained within this one.
public boolean overlaps(Location l)
Location
Abstractly, two locations overlap if they both contain any point.
public Location union(Location loc)
Location
public Location intersection(Location loc)
Location
intersection
in interface Location
loc
- the Location to intersect withpublic boolean equals(Object o)
Location
Abstractly, 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.
Copyright © 2014 BioJava. All rights reserved.