78 * @return UCharacterIterator object
79 * @exception IllegalArgumentException if the argument is null
80 * @stable ICU 2.4
81 */
82 public static final UCharacterIterator getInstance(String source){
83 return new ReplaceableUCharacterIterator(source);
84 }
85
86 /**
87 * Returns a <code>UCharacterIterator</code> object given a
88 * source StringBuffer.
89 * @param source an string buffer of UTF-16 code units
90 * @return UCharacterIterator object
91 * @exception IllegalArgumentException if the argument is null
92 * @stable ICU 2.4
93 */
94 public static final UCharacterIterator getInstance(StringBuffer source){
95 return new ReplaceableUCharacterIterator(source);
96 }
97
98 /**
99 * Returns a <code>UCharacterIterator</code> object given a
100 * CharacterIterator.
101 * @param source a valid CharacterIterator object.
102 * @return UCharacterIterator object
103 * @exception IllegalArgumentException if the argument is null
104 * @stable ICU 2.4
105 */
106 public static final UCharacterIterator getInstance(CharacterIterator source){
107 return new CharacterIteratorWrapper(source);
108 }
109
110 // public methods ----------------------------------------------------------
111
112 /**
113 * Returns the length of the text
114 * @return length of the text
115 * @stable ICU 2.4
116 */
117 public abstract int getLength();
118
|
78 * @return UCharacterIterator object
79 * @exception IllegalArgumentException if the argument is null
80 * @stable ICU 2.4
81 */
82 public static final UCharacterIterator getInstance(String source){
83 return new ReplaceableUCharacterIterator(source);
84 }
85
86 /**
87 * Returns a <code>UCharacterIterator</code> object given a
88 * source StringBuffer.
89 * @param source an string buffer of UTF-16 code units
90 * @return UCharacterIterator object
91 * @exception IllegalArgumentException if the argument is null
92 * @stable ICU 2.4
93 */
94 public static final UCharacterIterator getInstance(StringBuffer source){
95 return new ReplaceableUCharacterIterator(source);
96 }
97
98 /**
99 * Returns a <code>UCharacterIterator</code> object given a
100 * CharacterIterator.
101 * @param source a valid CharacterIterator object.
102 * @return UCharacterIterator object
103 * @exception IllegalArgumentException if the argument is null
104 * @stable ICU 2.4
105 */
106 public static final UCharacterIterator getInstance(CharacterIterator source){
107 return new CharacterIteratorWrapper(source);
108 }
109
110 // public methods ----------------------------------------------------------
111
112 /**
113 * Returns the length of the text
114 * @return length of the text
115 * @stable ICU 2.4
116 */
117 public abstract int getLength();
118
|