Package org.biojava.bio.symbol
Class AbstractRangeLocation
java.lang.Object
org.biojava.bio.symbol.AbstractLocation
org.biojava.bio.symbol.AbstractRangeLocation
- All Implemented Interfaces:
Serializable,Location
- Direct Known Subclasses:
FuzzyLocation,PointLocation,RangeLocation
Base class for simple contiguous Location implementations.
Just implement
getMin and getMax, and translate..- Author:
- Matthew Pocock, Keith James
- See Also:
-
Field Summary
Fields inherited from interface org.biojava.bio.symbol.Location
empty, full, naturalOrder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn an Iterator over the set of maximal contiguous sub-locations.booleancontains(int p) Checks if this location contains a point.booleanDetermine if a Location is contiguous.symbols(SymbolList seq) Return the symbols in a sequence that fall within this range.Methods inherited from class org.biojava.bio.symbol.AbstractLocation
contains, equals, getDecorator, hashCode, intersection, newInstance, overlaps, union
-
Constructor Details
-
AbstractRangeLocation
public AbstractRangeLocation()
-
-
Method Details
-
blockIterator
Description copied from interface:LocationReturn an Iterator over the set of maximal contiguous sub-locations.Given any location, it can be considered to contain zero or more maximal contiguous blocks of width 1 or greater. The empty location is composed from nothing. A contiguous location is composed from itself. A non-contiguous location is composed from contiguous blocks seperated by gaps.
This method should return an Iterator over these maximally contiguous blocks starting with the left-most block, and finishing at the right-most block.
- Returns:
- an Iterator over Location objects that are the maximally contiguous set of locations contained within this location
-
isContiguous
Description copied from interface:LocationDetermine if a Location is contiguous.- Returns:
trueif and only if this Location contains every point frommintomaxinclusive.
-
symbols
Description copied from interface:LocationReturn the symbols in a sequence that fall within this range.- Parameters:
seq- the SymbolList to process- Returns:
- the SymbolList containing the symbols in seq in this range
-
contains
Description copied from interface:LocationChecks if this location contains a point.- Parameters:
p- the point to check- Returns:
- true if this contains p, otherwise false
-