public class ResidueRangeAndLength extends ResidueRange
end − start
.CHAIN_REGEX, RANGE_REGEX
Constructor and Description |
---|
ResidueRangeAndLength(String chain,
ResidueNumber start,
ResidueNumber end,
int length) |
ResidueRangeAndLength(String chain,
String start,
String end,
int length) |
Modifier and Type | Method and Description |
---|---|
static int |
calcLength(List<ResidueRangeAndLength> rrs)
Calculates the combined number of residues of the ResidueRanges in
rrs . |
boolean |
equals(Object o) |
int |
getLength() |
int |
hashCode() |
Iterator<ResidueNumber> |
iterator(AtomPositionMap map)
Returns a new Iterator over every
ResidueNumber in this ResidueRange. |
static ResidueRangeAndLength |
parse(String s,
AtomPositionMap map)
Parses a residue range.
|
static List<ResidueRangeAndLength> |
parseMultiple(List<String> ranges,
AtomPositionMap map) |
static List<ResidueRangeAndLength> |
parseMultiple(String s,
AtomPositionMap map) |
contains, getChainId, getEnd, getResidue, getStart, multiIterator, multiIterator, parse, parseMultiple, parseMultiple, toString, toString, toStrings
public ResidueRangeAndLength(String chain, ResidueNumber start, ResidueNumber end, int length)
public Iterator<ResidueNumber> iterator(AtomPositionMap map)
ResidueNumber
in this ResidueRange.
Stores the contents of map
until the iterator is finished, so calling code should set the iterator to null
if it did not finish.iterator
in class ResidueRange
public static int calcLength(List<ResidueRangeAndLength> rrs)
rrs
.
Assumes no overlap. If two or more ranges cover the same residues, will over-count the union of the residues.rrs
- A list of ResidueRangesIllegalArgumentException
- If the length
of one or more ResidueRange is nullgetLength()
public static ResidueRangeAndLength parse(String s, AtomPositionMap map)
ResidueRange.parse(String)
.s
- A string of the form chain_start-end. For example: A.5-100
.s
.public static List<ResidueRangeAndLength> parseMultiple(List<String> ranges, AtomPositionMap map)
public static List<ResidueRangeAndLength> parseMultiple(String s, AtomPositionMap map)
s
- A string of the form chain_start-end,chain_start-end, ... For example:
A.5-100,R_110-190,Z_200-250
.s
.public int getLength()
public boolean equals(Object o)
equals
in class ResidueRange
public int hashCode()
hashCode
in class ResidueRange
Copyright © 2000–2016 BioJava. All rights reserved.