X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fcom%2Fstevesoft%2Fpat%2Fwrap%2FCharArrayWrap.java;h=bde9bd1e2236c4185c925c154903468822632e34;hb=8f8e6868f55cfe6ab73b3fe82cfb360f3e71a025;hp=e490cc9da64d9633cca70d26a3e2002da8188c5f;hpb=c40cf903f740a72ab63dd1abc10fa33450ce660d;p=jalview.git diff --git a/src/com/stevesoft/pat/wrap/CharArrayWrap.java b/src/com/stevesoft/pat/wrap/CharArrayWrap.java index e490cc9..bde9bd1 100755 --- a/src/com/stevesoft/pat/wrap/CharArrayWrap.java +++ b/src/com/stevesoft/pat/wrap/CharArrayWrap.java @@ -1,39 +1,75 @@ -// -// 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.*; - -/** This provides a wrapper for a char array so that - it can be searched by Regex. */ -public class CharArrayWrap implements StringLike { - char[] ca; - public char[] getCharArray() { return ca; } - public CharArrayWrap(char[] ca) { this.ca = ca; } - public String toString() { - return new String(ca); - } - public char charAt(int i) { return ca[i]; } - public int length() { return ca.length; } - public String substring(int i1,int i2) { - StringBuffer sb = new StringBuffer(); - for(int i=i1;i