/** * Compare residue numbers by chain, sequence number, and insertion code */ @Override public int compareTo(ResidueNumber other) { // chain id if (chainName != null && other.chainName != null) { if (!chainName.equals(other.chainName)) return chainName.compareTo(other.chainName); } if (chainName != null && other.chainName == null) { return 1; } else if (chainName == null && other.chainName != null) { return -1; } return compareToPositional(other); }
ResidueNumber pos = g.getResidueNumber(); if ( start != null && start.compareToPositional(pos) <= 0) { foundStart = true; adding = true; if ( end.compareToPositional(pos) <= 0) { adding = false; break;