1 /* GENERATED SOURCE. DO NOT MODIFY. */ 2 // © 2016 and later: Unicode, Inc. and others. 3 // License & terms of use: http://www.unicode.org/copyright.html#License 4 /* 5 ****************************************************************************** 6 * Copyright (C) 1996-2009, International Business Machines Corporation and * 7 * others. All Rights Reserved. * 8 ****************************************************************************** 9 */ 10 11 /* 12 * @author Shaopeng Jia 13 */ 14 15 package android.icu.impl; 16 17 import android.icu.impl.PropsVectors.CompactHandler; 18 19 /** 20 * @hide Only a subset of ICU is exposed in Android 21 */ 22 public class PVecToTrieCompactHandler implements CompactHandler { 23 public IntTrieBuilder builder; 24 public int initialValue; 25 26 @Override setRowIndexForErrorValue(int rowIndex)27 public void setRowIndexForErrorValue(int rowIndex) { 28 } 29 30 @Override setRowIndexForInitialValue(int rowIndex)31 public void setRowIndexForInitialValue(int rowIndex) { 32 initialValue = rowIndex; 33 } 34 35 @Override setRowIndexForRange(int start, int end, int rowIndex)36 public void setRowIndexForRange(int start, int end, int rowIndex) { 37 builder.setRange(start, end + 1, rowIndex, true); 38 } 39 40 @Override startRealValues(int rowIndex)41 public void startRealValues(int rowIndex) { 42 if (rowIndex > 0xffff) { 43 // too many rows for a 16-bit trie 44 throw new IndexOutOfBoundsException(); 45 } else { 46 builder = new IntTrieBuilder(null, 100000, initialValue, 47 initialValue, false); 48 } 49 } 50 } 51