public int parseInto(DateTimeParserBucket bucket, CharSequence text, int position) { Map<String, DateTimeZone> parseLookup = iParseLookup; parseLookup = (parseLookup != null ? parseLookup : DateTimeUtils.getDefaultTimeZoneNames()); String matched = null; for (String name : parseLookup.keySet()) { if (csStartsWith(text, position, name)) { if (matched == null || name.length() > matched.length()) { matched = name; } } } if (matched != null) { bucket.setZone(parseLookup.get(matched)); return position + matched.length(); } return ~position; } }
public int parseInto(DateTimeParserBucket bucket, CharSequence text, int position) { Map<String, DateTimeZone> parseLookup = iParseLookup; parseLookup = (parseLookup != null ? parseLookup : DateTimeUtils.getDefaultTimeZoneNames()); String matched = null; for (String name : parseLookup.keySet()) { if (csStartsWith(text, position, name)) { if (matched == null || name.length() > matched.length()) { matched = name; } } } if (matched != null) { bucket.setZone(parseLookup.get(matched)); return position + matched.length(); } return ~position; } }
for (int i = 0; i < suffixSet.size(); i++) { String suffix = suffixSet.get(i); if (csStartsWith(text, pos, suffix)) { if (best == null || suffix.length() > best.length()) { best = suffix;
for (int i = 0; i < suffixSet.size(); i++) { String suffix = suffixSet.get(i); if (csStartsWith(text, pos, suffix)) { if (best == null || suffix.length() > best.length()) { best = suffix;
public int parseInto(DateTimeParserBucket bucket, CharSequence text, int position) { String best = null; for (String id : ALL_IDS) { if (csStartsWith(text, position, id)) { if (best == null || id.length() > best.length()) { best = id; } } } if (best != null) { bucket.setZone(DateTimeZone.forID(best)); return position + best.length(); } return ~position; } }
public int parseInto(DateTimeParserBucket bucket, CharSequence text, int position) { Map<String, DateTimeZone> parseLookup = iParseLookup; parseLookup = (parseLookup != null ? parseLookup : DateTimeUtils.getDefaultTimeZoneNames()); String matched = null; for (String name : parseLookup.keySet()) { if (csStartsWith(text, position, name)) { if (matched == null || name.length() > matched.length()) { matched = name; } } } if (matched != null) { bucket.setZone(parseLookup.get(matched)); return position + matched.length(); } return ~position; } }
public int parseInto(DateTimeParserBucket bucket, CharSequence text, int position) { Map<String, DateTimeZone> parseLookup = iParseLookup; parseLookup = (parseLookup != null ? parseLookup : DateTimeUtils.getDefaultTimeZoneNames()); String matched = null; for (String name : parseLookup.keySet()) { if (csStartsWith(text, position, name)) { if (matched == null || name.length() > matched.length()) { matched = name; } } } if (matched != null) { bucket.setZone(parseLookup.get(matched)); return position + matched.length(); } return ~position; } }
for (int i = 0; i < suffixSet.size(); i++) { String suffix = suffixSet.get(i); if (csStartsWith(text, pos, suffix)) { if (best == null || suffix.length() > best.length()) { best = suffix;