1.1 --- a/src/com/sun/org/apache/regexp/internal/StringCharacterIterator.java Sat Oct 24 16:18:47 2020 +0800 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,62 +0,0 @@ 1.4 -/* 1.5 - * reserved comment block 1.6 - * DO NOT REMOVE OR ALTER! 1.7 - */ 1.8 -/* 1.9 - * Copyright 1999-2004 The Apache Software Foundation. 1.10 - * 1.11 - * Licensed under the Apache License, Version 2.0 (the "License"); 1.12 - * you may not use this file except in compliance with the License. 1.13 - * You may obtain a copy of the License at 1.14 - * 1.15 - * http://www.apache.org/licenses/LICENSE-2.0 1.16 - * 1.17 - * Unless required by applicable law or agreed to in writing, software 1.18 - * distributed under the License is distributed on an "AS IS" BASIS, 1.19 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1.20 - * See the License for the specific language governing permissions and 1.21 - * limitations under the License. 1.22 - */ 1.23 - 1.24 -package com.sun.org.apache.regexp.internal; 1.25 - 1.26 -/** 1.27 - * Encapsulates String as CharacterIterator. 1.28 - * 1.29 - * @author <a href="mailto:ales.novak@netbeans.com">Ales Novak</a> 1.30 - */ 1.31 -public final class StringCharacterIterator implements CharacterIterator 1.32 -{ 1.33 - /** encapsulated */ 1.34 - private final String src; 1.35 - 1.36 - /** @param src - encapsulated String */ 1.37 - public StringCharacterIterator(String src) 1.38 - { 1.39 - this.src = src; 1.40 - } 1.41 - 1.42 - /** @return a substring */ 1.43 - public String substring(int beginIndex, int endIndex) 1.44 - { 1.45 - return src.substring(beginIndex, endIndex); 1.46 - } 1.47 - 1.48 - /** @return a substring */ 1.49 - public String substring(int beginIndex) 1.50 - { 1.51 - return src.substring(beginIndex); 1.52 - } 1.53 - 1.54 - /** @return a character at the specified position. */ 1.55 - public char charAt(int pos) 1.56 - { 1.57 - return src.charAt(pos); 1.58 - } 1.59 - 1.60 - /** @return <tt>true</tt> iff if the specified index is after the end of the character stream */ 1.61 - public boolean isEnd(int pos) 1.62 - { 1.63 - return (pos >= src.length()); 1.64 - } 1.65 -}