Package org.biojava.bio.symbol
Class RangeLocation
java.lang.Object
org.biojava.bio.symbol.AbstractLocation
org.biojava.bio.symbol.AbstractRangeLocation
org.biojava.bio.symbol.RangeLocation
- All Implemented Interfaces:
Serializable
,Location
- Direct Known Subclasses:
MergeLocation
A simple implementation of Location that contains all points between
getMin and getMax inclusive.
This will in practice be the most commonly used pure-java implementation.
- Author:
- Matthew Pocock
- See Also:
-
Field Summary
Fields inherited from interface org.biojava.bio.symbol.Location
empty, full, naturalOrder
-
Constructor Summary
ConstructorsConstructorDescriptionRangeLocation
(int min, int max) Construct a new RangeLocation frommin
tomax
. -
Method Summary
Methods inherited from class org.biojava.bio.symbol.AbstractRangeLocation
blockIterator, contains, isContiguous, symbols
Methods inherited from class org.biojava.bio.symbol.AbstractLocation
contains, equals, getDecorator, hashCode, intersection, newInstance, overlaps, union
-
Constructor Details
-
RangeLocation
Construct a new RangeLocation frommin
tomax
.- Throws:
IndexOutOfBoundsException
-
-
Method Details
-
getMin
Description copied from interface:Location
The minimum position contained.WARNING: The location will not contain every point between
getMin()
andgetMax()
ifisContiguous()
is false. IfisContiguous()
does return false you should use theIterator
returned byblockIterator()
to iterate over the minimum set of contiguous blocks that make up thisLocation
-
getMax
Description copied from interface:Location
The maximum position contained.WARNING: The location will not contain every point between
getMin()
andgetMax()
ifisContiguous()
is false. IfisContiguous()
does return false you should use theIterator
returned byblockIterator()
to iterate over the minimum set of contiguous blocks that make up thisLocation
-
translate
Description copied from interface:Location
Create a location that is a translation of this location. -
toString
-