import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static org.unicode.cldr.api.AttributeKey.keyOf;
-import static org.unicode.cldr.api.CldrData.PathOrder.ARBITRARY;
+import static org.unicode.cldr.api.CldrData.PathOrder.DTD;
import static org.unicode.cldr.api.CldrDataType.BCP47;
import java.util.LinkedHashMap;
@VisibleForTesting // It's easier to supply a fake data instance than a fake supplier.
static ImmutableList<IcuData> process(CldrData cldrData) {
Bcp47Visitor visitor = new Bcp47Visitor();
- cldrData.accept(ARBITRARY, visitor);
+ cldrData.accept(DTD, visitor);
visitor.addKeyMapValues();
return ImmutableList.of(visitor.keyTypeData.icuData, visitor.tzData.icuData);
}
package org.unicode.icu.tool.cldrtoicu.mapper;
import static org.unicode.cldr.api.AttributeKey.keyOf;
-import static org.unicode.cldr.api.CldrData.PathOrder.ARBITRARY;
import static org.unicode.cldr.api.CldrData.PathOrder.DTD;
import static org.unicode.cldr.api.CldrDataSupplier.CldrResolution.UNRESOLVED;
@VisibleForTesting // It's easier to supply a fake data instance than a fake supplier.
static IcuData process(String localeId, CldrData cldrData, Optional<CldrData> icuSpecialData) {
BreakIteratorMapper mapper = new BreakIteratorMapper(localeId);
- icuSpecialData.ifPresent(s -> s.accept(ARBITRARY, mapper::addSpecials));
+ icuSpecialData.ifPresent(s -> s.accept(DTD, mapper::addSpecials));
cldrData.accept(DTD, mapper::addSuppression);
return mapper.icuData;
}
import static com.google.common.base.Preconditions.checkArgument;
import static org.unicode.cldr.api.AttributeKey.keyOf;
-import static org.unicode.cldr.api.CldrData.PathOrder.ARBITRARY;
+import static org.unicode.cldr.api.CldrData.PathOrder.DTD;
import static org.unicode.cldr.api.CldrDataSupplier.CldrResolution.UNRESOLVED;
import java.util.Optional;
@VisibleForTesting // It's easier to supply a fake data instance than a fake supplier.
static IcuData process(String localeId, CldrData cldrData, Optional<CldrData> icuSpecialData) {
CollationVisitor visitor = new CollationVisitor(localeId);
- icuSpecialData.ifPresent(s -> s.accept(ARBITRARY, visitor));
- cldrData.accept(ARBITRARY, visitor);
+ icuSpecialData.ifPresent(s -> s.accept(DTD, visitor));
+ cldrData.accept(DTD, visitor);
return visitor.icuData;
}
package org.unicode.icu.tool.cldrtoicu.mapper;
import static org.unicode.cldr.api.AttributeKey.keyOf;
-import static org.unicode.cldr.api.CldrData.PathOrder.ARBITRARY;
+import static org.unicode.cldr.api.CldrData.PathOrder.NESTED_GROUPING;
import static org.unicode.cldr.api.CldrDataType.SUPPLEMENTAL;
import java.util.Optional;
@VisibleForTesting // It's easier to supply a fake data instance than a fake supplier.
static IcuData process(CldrData data) {
RuleSetVisitor mapper = new RuleSetVisitor();
- data.accept(ARBITRARY, mapper);
+ data.accept(NESTED_GROUPING, mapper);
return mapper.icuData;
}
import static com.google.common.base.Preconditions.checkState;
import static org.unicode.cldr.api.AttributeKey.keyOf;
-import static org.unicode.cldr.api.CldrData.PathOrder.ARBITRARY;
+import static org.unicode.cldr.api.CldrData.PathOrder.NESTED_GROUPING;
import static org.unicode.cldr.api.CldrDataType.SUPPLEMENTAL;
import org.unicode.cldr.api.AttributeKey;
@VisibleForTesting // It's easier to supply a fake data instance than a fake supplier.
static IcuData process(CldrData data) {
PluralRangesVisitor visitor = new PluralRangesVisitor();
- data.accept(ARBITRARY, visitor);
+ data.accept(NESTED_GROUPING, visitor);
return visitor.icuData;
}
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static org.unicode.cldr.api.AttributeKey.keyOf;
-import static org.unicode.cldr.api.CldrData.PathOrder.ARBITRARY;
+import static org.unicode.cldr.api.CldrData.PathOrder.NESTED_GROUPING;
import static org.unicode.cldr.api.CldrDataType.SUPPLEMENTAL;
import java.util.ArrayList;
// affects the set indices we generate during processing. Ideally this would all be immune
// to ordering (or just enforce DTD ordering) but right now it's very dependent on
// mimicking the order of the existing code to get identical output.
- data.accept(ARBITRARY, visitor.setType("cardinal"));
- data.accept(ARBITRARY, visitor.setType("ordinal"));
+ data.accept(NESTED_GROUPING, visitor.setType("cardinal"));
+ data.accept(NESTED_GROUPING, visitor.setType("ordinal"));
return visitor.icuData;
}
@Override
void addResults() {
- // DTD and NESTED_GROUPING order differ because of how the magic <FIFO> label works (it
- // basically enforces "encounter order" onto things in unlabeled sequences, which matches
+ // NESTED_GROUPING and DTD order differ because of how the magic <FIFO> label works (it
+ // basically enforces "encounter order" onto things in unlabelled sequences, which matches
// the old behaviour). If it wouldn't break anything, it might be worth moving to DTD order
// to remove any lingering implicit dependencies on the CLDR data behaviour.
getCldrData().accept(NESTED_GROUPING, this::visit);