private boolean trFind(int c, boolean[]table, TrTables tables) { if (c < TRANS_SIZE) { return table[c]; } else { if (tables != null) { if (tables.del != null) { if (tables.noDel == null || tables.noDel.get(c) == null) return true; } else if (tables.noDel != null && tables.noDel.get(c) != null) return false; } return table[TRANS_SIZE]; } }
trans[c] = -1; } else { if (hash == null) hash = new IntHash<Integer>(); hash.put(c, 1); // QTRUE if (codeLength(enc, r) != 1) singlebyte = false; } else { if (hash == null) hash = new IntHash<Integer>(); hash.put(c, r); c = trCode(c, trans, hash, cflag, last, false); } else if (hash != null) { Integer tmp = hash.get(c); if (tmp == null) { if (cflag) { c = trans[c]; } else if (hash != null) { Integer tmp = hash.get(c); if (tmp == null) { if (cflag) {
private boolean trFind(int c, boolean[]table, TrTables tables) { if (c < TRANS_SIZE) { return table[c]; } else { if (tables != null) { if (tables.del != null) { if (tables.noDel == null || tables.noDel.get(c) == null) return true; } else if (tables.noDel != null && tables.noDel.get(c) != null) return false; } return table[TRANS_SIZE]; } }
trans[c] = -1; } else { if (hash == null) hash = new IntHash<Integer>(); hash.put(c, 1); // QTRUE if (codeLength(enc, r) != 1) singlebyte = false; } else { if (hash == null) hash = new IntHash<Integer>(); hash.put(c, r); c = trCode(c, trans, hash, cflag, last, false); } else if (hash != null) { Integer tmp = hash.get(c); if (tmp == null) { if (cflag) { c = trans[c]; } else if (hash != null) { Integer tmp = hash.get(c); if (tmp == null) { if (cflag) {
private int trCode(int c, int[]trans, IntHash<Integer> hash, boolean cflag, int last, boolean set) { if (c < TRANS_SIZE) { return trans[c]; } else if (hash != null) { Integer tmp = hash.get(c); if (tmp == null) { return cflag ? last : -1; } else { return cflag ? -1 : tmp; } } else { return cflag && set ? last : -1; } }
static int caseFold(int codePoint) { int[] to = Unicode10Data.FoldHash.get(codePoint); return to != null ? to[0] : -1; }
private static int trCode(int c, int[]trans, IntHash<Integer> hash, boolean cflag, int last, boolean set) { if (c < StringSupport.TRANS_SIZE) { return trans[c]; } else if (hash != null) { Integer tmp = hash.get(c); if (tmp == null) { return cflag ? last : -1; } else { return cflag ? -1 : tmp; } } else { return cflag && set ? last : -1; } }
static int caseFold(int codePoint) { int[] to = Unicode10Data.FoldHash.get(codePoint); return to != null ? to[0] : -1; }
private static int trCode(int c, int[]trans, IntHash<Integer> hash, boolean cflag, int last, boolean set) { if (c < StringSupport.TRANS_SIZE) { return trans[c]; } else if (hash != null) { Integer tmp = hash.get(c); if (tmp == null) { return cflag ? last : -1; } else { return cflag ? -1 : tmp; } } else { return cflag && set ? last : -1; } }
private int trCode(int c, int[]trans, IntHash<Integer> hash, boolean cflag, int last, boolean set) { if (c < TRANS_SIZE) { return trans[c]; } else if (hash != null) { Integer tmp = hash.get(c); if (tmp == null) { return cflag ? last : -1; } else { return cflag ? -1 : tmp; } } else { return cflag && set ? last : -1; } }
static int[] caseUnfold(int codePoint) { return Unicode10Data.UnfoldHash.get(codePoint); }
static int[] caseUnfold(int codePoint) { return Unicode10Data.UnfoldHash.get(codePoint); }
@JRubyMethod(name = "from_native") public final IRubyObject from_native(ThreadContext context, IRubyObject value, IRubyObject ctx) { RubySymbol sym; if (value instanceof RubyInteger && (sym = valueToSymbol.get((int) ((RubyInteger) value).getLongValue())) != null) { return sym; } return value; }
@JRubyMethod(name = "from_native") public final IRubyObject from_native(ThreadContext context, IRubyObject value, IRubyObject ctx) { RubySymbol sym; if (value instanceof RubyInteger && (sym = valueToSymbol.get((int) ((RubyInteger) value).getLongValue())) != null) { return sym; } return value; }