X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fcom%2Fstevesoft%2Fpat%2Fwrap%2FStringWrap.java;h=8396dd9f857ae20d056af4b2dec972f0c48a7729;hb=4b2be7cd8c14e67cc347609199e25c7f09fda988;hp=6c07ca1de57f3bd28265cb1afaae42bf24819152;hpb=c40cf903f740a72ab63dd1abc10fa33450ce660d;p=jalview.git diff --git a/src/com/stevesoft/pat/wrap/StringWrap.java b/src/com/stevesoft/pat/wrap/StringWrap.java index 6c07ca1..8396dd9 100755 --- a/src/com/stevesoft/pat/wrap/StringWrap.java +++ b/src/com/stevesoft/pat/wrap/StringWrap.java @@ -1,33 +1,60 @@ -// -// This software is now distributed according to -// the Lesser Gnu Public License. Please see -// http://www.gnu.org/copyleft/lesser.txt for -// the details. -// -- Happy Computing! -// -package com.stevesoft.pat.wrap; - -import com.stevesoft.pat.*; - -/** A basic wrapper for the String object. Regex does - not search String directly any longer, it searches StringLike. */ -public class StringWrap implements StringLike { - String s; - public StringWrap(String s) { - this.s = s; - } - public String toString() { return s; } - public char charAt(int i) { return s.charAt(i); } - public int length() { return s.length(); } - public String substring(int i1,int i2) { - return s.substring(i1,i2); - } - public Object unwrap() { return s; } - public BasicStringBufferLike newStringBufferLike() { - return new StringBufferWrap(); - } - - public int indexOf(char c) { - return s.indexOf(c); - } -} +// +// This software is now distributed according to +// the Lesser Gnu Public License. Please see +// http://www.gnu.org/copyleft/lesser.txt for +// the details. +// -- Happy Computing! +// +package com.stevesoft.pat.wrap; + +import com.stevesoft.pat.BasicStringBufferLike; +import com.stevesoft.pat.StringLike; + +/** + * A basic wrapper for the String object. Regex does not search String directly + * any longer, it searches StringLike. + */ +public class StringWrap implements StringLike +{ + String s; + + public StringWrap(String s) + { + this.s = s; + } + + public String toString() + { + return s; + } + + public char charAt(int i) + { + return s.charAt(i); + } + + public int length() + { + return s.length(); + } + + public String substring(int i1, int i2) + { + return s.substring(i1, i2); + } + + public Object unwrap() + { + return s; + } + + public BasicStringBufferLike newStringBufferLike() + { + return new StringBufferWrap(); + } + + public int indexOf(char c) + { + return s.indexOf(c); + } +}