/* */ package com.ibm.icu.text; /* */ /* */ import java.util.HashMap; /* */ import java.util.Map; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /** /* */ * @deprecated /* */ */ /* */ public class RuleBasedTransliterator /* */ extends Transliterator /* */ { /* */ private Data data; /* */ /* */ /** /* */ * @deprecated /* */ */ /* */ RuleBasedTransliterator(String ID, Data data, UnicodeFilter filter) /* */ { /* 321 */ super(ID, filter); /* 322 */ this.data = data; /* 323 */ setMaximumContextLength(data.ruleSet.getMaximumContextLength()); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /** /* */ * @deprecated /* */ */ /* */ protected void handleTransliterate(Replaceable text, Transliterator.Position index, boolean incremental) /* */ { /* 357 */ synchronized (this.data) { /* 358 */ int loopCount = 0; /* 359 */ int loopLimit = index.limit - index.start << 4; /* 360 */ if (loopLimit < 0) { /* 361 */ loopLimit = Integer.MAX_VALUE; /* */ } /* */ /* */ /* 365 */ while ((index.start < index.limit) && (loopCount <= loopLimit) && (this.data.ruleSet.transliterate(text, index, incremental))) /* */ { /* 367 */ loopCount++; } /* */ } } /* */ /* */ static class Data { public TransliterationRuleSet ruleSet; /* */ Map<String, char[]> variableNames; /* */ Object[] variables; /* */ char variablesBase; /* */ /* 375 */ public Data() { this.variableNames = new HashMap(); /* 376 */ this.ruleSet = new TransliterationRuleSet(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public UnicodeMatcher lookupMatcher(int standIn) /* */ { /* 418 */ int i = standIn - this.variablesBase; /* 419 */ return (i >= 0) && (i < this.variables.length) ? (UnicodeMatcher)this.variables[i] : null; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public UnicodeReplacer lookupReplacer(int standIn) /* */ { /* 428 */ int i = standIn - this.variablesBase; /* 429 */ return (i >= 0) && (i < this.variables.length) ? (UnicodeReplacer)this.variables[i] : null; /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /** /* */ * @deprecated /* */ */ /* */ public String toRules(boolean escapeUnprintable) /* */ { /* 448 */ return this.data.ruleSet.toRules(escapeUnprintable); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void addSourceTargetSet(UnicodeSet filter, UnicodeSet sourceSet, UnicodeSet targetSet) /* */ { /* 476 */ this.data.ruleSet.addSourceTargetSet(filter, sourceSet, targetSet); /* */ } /* */ /* */ /* */ /** /* */ * @deprecated /* */ */ /* */ public Transliterator safeClone() /* */ { /* 485 */ UnicodeFilter filter = getFilter(); /* 486 */ if ((filter != null) && ((filter instanceof UnicodeSet))) { /* 487 */ filter = new UnicodeSet((UnicodeSet)filter); /* */ } /* 489 */ return new RuleBasedTransliterator(getID(), this.data, filter); /* */ } /* */ } /* Location: C:\Users\Ethan\Desktop\FontZip\FontTool\sfnttool.jar!\com\ibm\icu\text\RuleBasedTransliterator.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */