public class MergeLocation extends RangeLocation
RangeLocation
and can be used
as such but it also retains knowledge of which individual components made
it up. None of the methods of RangeLocation are overridden only new methods
have been added to get the subcomponents.
For example a union operation between the following locations
[1,20],[27,45],[30-70] will produce a CompoundLocation
like this: {[1,20],[27,70]}, the last two locations have been merged into a
MergeLocation
which contains the two subcomponents.
Copyright: Copyright (c) 2002
Company: AgResearch
empty, full, naturalOrder
Modifier and Type | Method and Description |
---|---|
ListIterator |
componentLocationIterator() |
List |
getComponentList(boolean recurse)
Gets the component locations that make up this one
|
static MergeLocation |
mergeLocations(List componentLocations)
Static Factory method for getting an instance of a
MergeLocation |
static MergeLocation |
mergeLocations(Location locA,
Location locB) |
getMax, getMin, toString, translate
blockIterator, contains, isContiguous, symbols
contains, equals, getDecorator, hashCode, intersection, newInstance, overlaps, union
public List getComponentList(boolean recurse)
recurse
- if true the method lists the component locations of all
nested MergedLocation
s.List
of Location
s.public ListIterator componentLocationIterator()
ListIterator
over the component locations. The iterator
does not recurse nested MergeLocations.public static MergeLocation mergeLocations(List componentLocations) throws BioException
MergeLocation
componentLocations
- the Locations to Merge
BioException
- if the list contains objects that are not Locations
or if the locations don't represent a contiguous block. Use
LocationTools.union()
if you want to merge discontinuous blocks.public static MergeLocation mergeLocations(Location locA, Location locB) throws BioException
BioException
Copyright © 2014 BioJava. All rights reserved.