X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fcom%2Fstevesoft%2Fpat%2FStringRule.java;h=10557d8e95b971ef7fa11fd08e97d695e9cafb52;hb=8721e357295c50d586f103aeadd6efac7714fb60;hp=c37b6bb8953a6b68a6fe8b7f2b6e378e8cf1f5d2;hpb=c40cf903f740a72ab63dd1abc10fa33450ce660d;p=jalview.git diff --git a/src/com/stevesoft/pat/StringRule.java b/src/com/stevesoft/pat/StringRule.java index c37b6bb..10557d8 100755 --- a/src/com/stevesoft/pat/StringRule.java +++ b/src/com/stevesoft/pat/StringRule.java @@ -1,22 +1,39 @@ -// -// 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; - -/** The apply method of this ReplaceRule simply appends the text - it was initialized with to the StringBufferLike. - @see com.stevesoft.pat.ReplaceRule - */ -public class StringRule extends ReplaceRule { - String s; - public StringRule(String s) { this.s = s; } - public void apply(StringBufferLike sb,RegRes res) { - sb.append(s); - } - public String toString1() { return s; } - public Object clone1() { return new StringRule(s); } -} +// +// 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; + +/** + * The apply method of this ReplaceRule simply appends the text it was + * initialized with to the StringBufferLike. + * + * @see com.stevesoft.pat.ReplaceRule + */ +public class StringRule extends ReplaceRule +{ + String s; + + public StringRule(String s) + { + this.s = s; + } + + public void apply(StringBufferLike sb, RegRes res) + { + sb.append(s); + } + + public String toString1() + { + return s; + } + + public Object clone1() + { + return new StringRule(s); + } +}