FileDocCategorySizeDatePackage
BreakIterator.javaAPI DocAndroid 1.5 API4403Wed May 06 22:41:04 BST 2009com.ibm.icu4jni.text

BreakIterator

public abstract class BreakIterator extends Object implements Cloneable

Fields Summary
protected static int
BI_CHAR_INSTANCE
protected static int
BI_WORD_INSTANCE
protected static int
BI_LINE_INSTANCE
protected static int
BI_SENT_INSTANCE
protected int
type
Constructors Summary
Methods Summary
public abstract java.lang.Objectclone()

public abstract intcurrent()

public abstract intfirst()

public abstract intfollowing(int offset)

public static java.util.Locale[]getAvailableLocales()

    
        
        
        String[] locales = NativeBreakIterator.getAvailableLocalesImpl();
        
        Locale[] result = new Locale[locales.length];
        
        String locale;
        
        int index, index2;
        
        for(int i = 0; i < locales.length; i++) {
            locale = locales[i];
            
            index = locale.indexOf('_");
            index2 = locale.lastIndexOf('_");
            
            if(index == -1) {
                result[i] = new Locale(locales[i]);
            } else if(index > 0 && index == index2) {
                result[i] = new Locale(
                        locale.substring(0,index),
                        locale.substring(index+1));
            } else if(index > 0 && index2 > index) {
                result[i] = new Locale(
                        locale.substring(0,index),
                        locale.substring(index+1,index2),
                        locale.substring(index2+1));
            }
        }
        
        return result;
    
public static com.ibm.icu4jni.text.BreakIteratorgetCharacterInstance()

        int iter = NativeBreakIterator.getCharacterInstanceImpl("");
        return new RuleBasedBreakIterator(iter, BI_CHAR_INSTANCE);
    
public static com.ibm.icu4jni.text.BreakIteratorgetCharacterInstance(java.util.Locale where)

        int iter = NativeBreakIterator.getCharacterInstanceImpl(where.toString());
        return new RuleBasedBreakIterator(iter, BI_CHAR_INSTANCE);
    
public static com.ibm.icu4jni.text.BreakIteratorgetLineInstance()

        int iter = NativeBreakIterator.getLineInstanceImpl("");
        return new RuleBasedBreakIterator(iter, BI_LINE_INSTANCE);
    
public static com.ibm.icu4jni.text.BreakIteratorgetLineInstance(java.util.Locale where)

        int iter = NativeBreakIterator.getLineInstanceImpl(where.toString());
        return new RuleBasedBreakIterator(iter, BI_LINE_INSTANCE);
    
public static com.ibm.icu4jni.text.BreakIteratorgetSentenceInstance()

        int iter = NativeBreakIterator.getSentenceInstanceImpl("");
        return new RuleBasedBreakIterator(iter, BI_SENT_INSTANCE);
    
public static com.ibm.icu4jni.text.BreakIteratorgetSentenceInstance(java.util.Locale where)

        int iter = NativeBreakIterator.getSentenceInstanceImpl(where.toString());
        return new RuleBasedBreakIterator(iter, BI_SENT_INSTANCE);
    
public abstract java.text.CharacterIteratorgetText()

public static com.ibm.icu4jni.text.BreakIteratorgetWordInstance()

        int iter = NativeBreakIterator.getWordInstanceImpl("");
        return new RuleBasedBreakIterator(iter, BI_WORD_INSTANCE);
    
public static com.ibm.icu4jni.text.BreakIteratorgetWordInstance(java.util.Locale where)

        int iter = NativeBreakIterator.getWordInstanceImpl(where.toString());
        return new RuleBasedBreakIterator(iter, BI_WORD_INSTANCE);
    
public abstract booleanisBoundary(int offset)

public abstract intlast()

public abstract intnext(int n)

public abstract intnext()

public abstract intpreceding(int offset)

public abstract intprevious()

public voidsetText(java.lang.String newText)

        setText(new StringCharacterIterator(newText));
    
public abstract voidsetText(java.text.CharacterIterator newText)