public class ResidueRange extends Object
ResidueNumber
,
ResidueRangeAndLength
Modifier and Type | Field and Description |
---|---|
static Pattern |
CHAIN_REGEX |
static Pattern |
RANGE_REGEX |
Constructor and Description |
---|
ResidueRange(String chain,
ResidueNumber start,
ResidueNumber end) |
ResidueRange(String chain,
String start,
String end) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(ResidueNumber residueNumber,
AtomPositionMap map) |
boolean |
equals(Object obj) |
String |
getChainId() |
ResidueNumber |
getEnd() |
ResidueNumber |
getResidue(int positionInRange,
AtomPositionMap map)
Returns the ResidueNumber that is at position
positionInRange in
this ResidueRange. |
ResidueNumber |
getStart() |
int |
hashCode() |
Iterator<ResidueNumber> |
iterator(AtomPositionMap map)
Returns a new Iterator over every
ResidueNumber in this ResidueRange. |
static Iterator<ResidueNumber> |
multiIterator(AtomPositionMap map,
List<? extends ResidueRange> rrs)
Returns a new Iterator over every
ResidueNumber in the list of ResidueRanges. |
static Iterator<ResidueNumber> |
multiIterator(AtomPositionMap map,
ResidueRange... rrs)
Returns a new Iterator over every
ResidueNumber in the list of ResidueRanges. |
static ResidueRange |
parse(String s)
Parse the residue range from a string.
|
static List<ResidueRange> |
parseMultiple(List<String> ranges) |
static List<ResidueRange> |
parseMultiple(String s) |
String |
toString() |
static String |
toString(List<? extends ResidueRange> ranges) |
static List<String> |
toStrings(List<? extends ResidueRange> ranges) |
public static final Pattern RANGE_REGEX
public static final Pattern CHAIN_REGEX
public ResidueRange(String chain, ResidueNumber start, ResidueNumber end)
public static ResidueRange parse(String s)
Residues can be positive or negative and may include insertion codes.
See ResidueNumber.fromString(String)
.
Examples:
A.5-100
A_5-100
A_-5
A.-12I-+12I
s
- residue string to parses
public static List<ResidueRange> parseMultiple(String s)
s
- A string of the form chain_start-end,chain_start-end, ... For example:
A.5-100,R_110-190,Z_200-250
.s
.parse(String)
public String getChainId()
public ResidueNumber getEnd()
public ResidueNumber getStart()
public ResidueNumber getResidue(int positionInRange, AtomPositionMap map)
positionInRange
in
this ResidueRange.public boolean contains(ResidueNumber residueNumber, AtomPositionMap map)
residueNumber
is within this ResidueRangepublic 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.public static Iterator<ResidueNumber> multiIterator(AtomPositionMap map, ResidueRange... rrs)
ResidueNumber
in the list of ResidueRanges.
Stores the contents of map
until the iterator is finished, so calling code should set the iterator to null
if it did not finish.public static Iterator<ResidueNumber> multiIterator(AtomPositionMap map, List<? extends ResidueRange> rrs)
ResidueNumber
in the list of ResidueRanges.
Stores the contents of map
until the iterator is finished, so calling code should set the iterator to null
if it did not finish.public static List<ResidueRange> parseMultiple(List<String> ranges)
public static List<String> toStrings(List<? extends ResidueRange> ranges)
public static String toString(List<? extends ResidueRange> ranges)
Copyright © 2000–2016 BioJava. All rights reserved.