/**
     * Ensure the builder is used with content we expect.
     * Currently (this could change) we should only have one DateTimeParser per DateComponentOrdering.
     */
private void validate() throws IllegalStateException {
      Set<DateComponentOrdering> orderings = Sets.newHashSet();
      if(preferred != null) {
        orderings.add(preferred.getOrdering());
      }
      for(DateTimeParser parser : otherParsers) {
        if(!orderings.add(parser.getOrdering())) {
          throw new IllegalStateException("DateComponentOrdering can only be used once in a DateTimeMultiParser." +
                  "[" + parser.getOrdering() + "]");
        }
      }
    }
private void validate() throws IllegalStateException {
Set<DateComponentOrdering> orderings = Sets.newHashSet();
if(preferred != null) {
orderings.add(preferred.getOrdering());
}
for(DateTimeParser parser : otherParsers) {
if(!orderings.add(parser.getOrdering())) {
throw new IllegalStateException("DateComponentOrdering can only be used once in a DateTimeMultiParser." +
"[" + parser.getOrdering() + "]");
}
}
}
private void validate() throws IllegalStateException {
Set<DateComponentOrdering> orderings = Sets.newHashSet();
if(preferred != null) {
orderings.add(preferred.getOrdering());
}
for(DateTimeParser parser : otherParsers) {
if(!orderings.add(parser.getOrdering())) {
throw new IllegalStateException("DateComponentOrdering can only be used once in a DateTimeMultiParser." +
"[" + parser.getOrdering() + "]");
}
}
}
private void validate() throws IllegalStateException {
Set<DateComponentOrdering> orderings = Sets.newHashSet();
if(preferred != null) {
orderings.add(preferred.getOrdering());
}
for(DateTimeParser parser : otherParsers) {
if(!orderings.add(parser.getOrdering())) {
throw new IllegalStateException("DateComponentOrdering can only be used once in a DateTimeMultiParser." +
"[" + parser.getOrdering() + "]");
}
}
}