|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.bio.symbol.AbstractLocation
org.biojava.bio.symbol.FuzzyPointLocation
public class FuzzyPointLocation
FuzzyPointLocation represents two types of EMBL-style
partially-defined locations. These are the '(123.567)' type, which
represent a single residue somewhere between these coordinates and
the '<123' or '>123' type, which represent an unbounded location,
not including the residue at that coordinate.
| Nested Class Summary | |
|---|---|
static interface |
FuzzyPointLocation.PointResolver
Determines how a FuzzyPointLocation should be treated when used
as a normal Location. |
| Field Summary | |
|---|---|
static FuzzyPointLocation.PointResolver |
RESOLVE_AVERAGE
|
static FuzzyPointLocation.PointResolver |
RESOLVE_MAX
|
static FuzzyPointLocation.PointResolver |
RESOLVE_MIN
|
| Fields inherited from interface org.biojava.bio.symbol.Location |
|---|
empty, full, naturalOrder |
| Constructor Summary | |
|---|---|
FuzzyPointLocation(int min,
int max,
FuzzyPointLocation.PointResolver resolver)
Creates a new FuzzyPointLocation object. |
|
| Method Summary | |
|---|---|
Iterator |
blockIterator()
Return an Iterator over the set of maximal contiguous sub-locations. |
boolean |
contains(int point)
Checks if this location contains a point. |
boolean |
contains(Location loc)
Checks if this location contains the other. |
boolean |
equals(Location loc)
|
int |
getMax()
The maximum position contained. |
int |
getMin()
The minimum position contained. |
FuzzyPointLocation.PointResolver |
getResolver()
|
boolean |
hasBoundedMax()
|
boolean |
hasBoundedMin()
|
int |
hashCode()
|
Location |
intersection(Location loc)
Returns a Location that contains all points common to both ranges. |
boolean |
isContiguous()
Determine if a Location is contiguous. |
boolean |
overlaps(Location loc)
Checks if these two locations overlap, using this location's concept of overlapping. |
SymbolList |
symbols(SymbolList slist)
Return the symbols in a sequence that fall within this range. |
String |
toString()
|
Location |
translate(int dist)
Create a location that is a translation of this location. |
| Methods inherited from class org.biojava.bio.symbol.AbstractLocation |
|---|
equals, getDecorator, newInstance, union |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final FuzzyPointLocation.PointResolver RESOLVE_MIN
public static final FuzzyPointLocation.PointResolver RESOLVE_MAX
public static final FuzzyPointLocation.PointResolver RESOLVE_AVERAGE
| Constructor Detail |
|---|
public FuzzyPointLocation(int min,
int max,
FuzzyPointLocation.PointResolver resolver)
FuzzyPointLocation object. If the minimum
value is equal to the maximum value, it is interperted as a swissprot
point location such as "?24". If the minimum is Integer.MIN_VALUE and
the maximum is Integer.MAX_VALUE, it is interperted as a swissprot
location like '?'.
min - an int value for the minimum boundary
of the location, Integer.MIN_VALUE if unbounded.max - an int value for the minimum boundary
of the location, Integer.MAX_VALUE if unbounded.resolver - a PointResolver which defines the
policy used to calculate the location's min and max
properties.| Method Detail |
|---|
public FuzzyPointLocation.PointResolver getResolver()
public int getMin()
Location
WARNING: The location will not contain every point between getMin()
and getMax() if isContiguous() is false. If isContiguous()
does return false you should use the Iterator returned by blockIterator()
to iterate over the minimum set of contiguous blocks that make up this Location
public int getMax()
Location
WARNING: The location will not contain every point between getMin()
and getMax() if isContiguous() is false. If isContiguous()
does return false you should use the Iterator returned by blockIterator()
to iterate over the minimum set of contiguous blocks that make up this Location
public boolean hasBoundedMin()
public boolean hasBoundedMax()
public boolean overlaps(Location loc)
LocationAbstractly, two locations overlap if they both contain any point.
overlaps in interface Locationoverlaps in class AbstractLocationloc - the Location to check
public boolean contains(Location loc)
LocationAbstractly, a location contains another if every point in the other location is contained within this one.
contains in interface Locationcontains in class AbstractLocationloc - the Location to check
public boolean contains(int point)
Location
point - the point to check
public boolean equals(Location loc)
public int hashCode()
hashCode in class AbstractLocationpublic Location intersection(Location loc)
Location
intersection in interface Locationintersection in class AbstractLocationloc - the Location to intersect with
public SymbolList symbols(SymbolList slist)
Location
slist - the SymbolList to process
public boolean isContiguous()
Location
true if and only if this Location
contains every point from min to
max inclusive.public Iterator blockIterator()
LocationGiven 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.
public Location translate(int dist)
Location
dist - the distance to translate (to the right)public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||