1 /** 2 ******************************************************************************* 3 * Copyright (C) 1996-2005, International Business Machines Corporation and * 4 * others. All Rights Reserved. * 5 ******************************************************************************* 6 * 7 * 8 ******************************************************************************* 9 */ 10 11 package libcore.icu; 12 13 /** 14 * Package static class for declaring all native methods for collation use. 15 * @author syn wee quek 16 * @internal ICU 2.4 17 */ 18 public final class NativeCollation { 19 private NativeCollation() { 20 } 21 22 // Collator. 23 public static native void closeCollator(int address); 24 public static native int compare(int address, String source, String target); 25 public static native int getAttribute(int address, int type); 26 public static native int getCollationElementIterator(int address, String source); 27 public static native String getRules(int address); 28 public static native byte[] getSortKey(int address, String source); 29 public static native int openCollator(String locale); 30 public static native int openCollatorFromRules(String rules, int normalizationMode, int collationStrength); 31 public static native int safeClone(int address); 32 public static native void setAttribute(int address, int type, int value); 33 34 // CollationElementIterator. 35 public static native void closeElements(int address); 36 public static native int getMaxExpansion(int address, int order); 37 public static native int getOffset(int address); 38 public static native int next(int address); 39 public static native int previous(int address); 40 public static native void reset(int address); 41 public static native void setOffset(int address, int offset); 42 public static native void setText(int address, String source); 43 } 44