Android
android.text
public static class

android.text.TextUtils.SimpleStringSplitter

java.lang.Object
android.text.TextUtils.SimpleStringSplitter TextUtils.StringSplitter Iterator<E>

A simple string splitter.

If the final character in the string to split is the delimiter then no empty string will be returned for the empty string after that delimeter. That is, splitting "a,b," on comma will return "a", "b", not "a", "b", "".

Summary

Public Constructors

            TextUtils.SimpleStringSplitter(char delimiter)
Initializes the splitter.

Public Methods

          boolean  hasNext()
Returns if there are more elements to iterate.
          Iterator<String iterator()

Returns an Iterator for the elements in this object.

          String  next()
Returns the next object in the iteration.
          void  remove()
Removes the last object returned by next from the collection.
          void  setString(String string)
Sets the string to split
Methods inherited from class java.lang.Object
Methods inherited from interface android.text.TextUtils.StringSplitter
Methods inherited from interface java.lang.Iterable
Methods inherited from interface java.util.Iterator

Details

Public Constructors

public TextUtils.SimpleStringSplitter(char delimiter)

Initializes the splitter. setString may be called later.

Parameters

delimiter the delimeter on which to split

Public Methods

public boolean hasNext()

Returns if there are more elements to iterate.

public Iterator<String> iterator()

Returns an Iterator for the elements in this object.

public String next()

Returns the next object in the iteration.

public void remove()

Removes the last object returned by next from the collection.

public void setString(String string)

Sets the string to split

Parameters

string the string to split
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48