src/share/classes/sun/font/CodePointIterator.java

Print this page




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /*
  27  * (C) Copyright IBM Corp. 2003 - All Rights Reserved
  28  *
  29  * The original version of this source code and documentation is
  30  * copyrighted and owned by IBM. These materials are provided
  31  * under terms of a License Agreement between IBM and Sun.
  32  * This technology is protected by multiple US and International
  33  * patents. This notice and attribution to IBM may not be removed.
  34  */
  35 
  36 package sun.text;
  37 
  38 import java.text.CharacterIterator;
  39 
  40 public abstract class CodePointIterator {
  41     public static final int DONE = -1;
  42 
  43     public abstract void setToStart();
  44     public abstract void setToLimit();
  45 
  46     public abstract int next();
  47     public abstract int prev();
  48 
  49     public abstract int charIndex();
  50 
  51     public static CodePointIterator create(char[] text) {
  52         return new CharArrayCodePointIterator(text);
  53     }
  54 
  55     public static CodePointIterator create(char[] text, int start, int limit) {
  56         return new CharArrayCodePointIterator(text, start, limit);




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /*
  27  * (C) Copyright IBM Corp. 2003 - All Rights Reserved
  28  *
  29  * The original version of this source code and documentation is
  30  * copyrighted and owned by IBM. These materials are provided
  31  * under terms of a License Agreement between IBM and Sun.
  32  * This technology is protected by multiple US and International
  33  * patents. This notice and attribution to IBM may not be removed.
  34  */
  35 
  36 package sun.font;
  37 
  38 import java.text.CharacterIterator;
  39 
  40 public abstract class CodePointIterator {
  41     public static final int DONE = -1;
  42 
  43     public abstract void setToStart();
  44     public abstract void setToLimit();
  45 
  46     public abstract int next();
  47     public abstract int prev();
  48 
  49     public abstract int charIndex();
  50 
  51     public static CodePointIterator create(char[] text) {
  52         return new CharArrayCodePointIterator(text);
  53     }
  54 
  55     public static CodePointIterator create(char[] text, int start, int limit) {
  56         return new CharArrayCodePointIterator(text, start, limit);