X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=unused%2Fcom%2Fstevesoft%2Fpat%2FAny.java;fp=unused%2Fcom%2Fstevesoft%2Fpat%2FAny.java;h=0ab0d953900c91c6d820fc786539aa3f2dec3fed;hb=6319110ce33faa76ee6cf9832e78faa224510fed;hp=c97599cba6b9c69f77535b9fa0e7eda0dc6dd140;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44;p=jalviewjs.git diff --git a/unused/com/stevesoft/pat/Any.java b/unused/com/stevesoft/pat/Any.java index c97599c..0ab0d95 100644 --- a/unused/com/stevesoft/pat/Any.java +++ b/unused/com/stevesoft/pat/Any.java @@ -1,55 +1,55 @@ -// -// 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; - -import java.util.*; - -/** - * This is the '.' character in a Pattern. It matches any character. - */ -class Any extends Pattern -{ - public int matchInternal(int pos, Pthings pt) - { - if (pos < pt.src.length()) - { - if (pt.dotDoesntMatchCR) - { - if (pt.src.charAt(pos) != '\n') - { - return nextMatch(pos + 1, pt); - } - } - else - { - return nextMatch(pos + 1, pt); - } - } - return -1; - } - - public String toString() - { - return "." + nextString(); - } - - public patInt minChars() - { - return new patInt(1); - } - - public patInt maxChars() - { - return new patInt(1); - } - - public Pattern clone1(Hashtable h) - { - return new Any(); - } -}; +// +// 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; + +import java.util.*; + +/** + * This is the '.' character in a Pattern. It matches any character. + */ +class Any extends Pattern +{ + public int matchInternal(int pos, Pthings pt) + { + if (pos < pt.src.length()) + { + if (pt.dotDoesntMatchCR) + { + if (pt.src.charAt(pos) != '\n') + { + return nextMatch(pos + 1, pt); + } + } + else + { + return nextMatch(pos + 1, pt); + } + } + return -1; + } + + public String toString() + { + return "." + nextString(); + } + + public patInt minChars() + { + return new patInt(1); + } + + public patInt maxChars() + { + return new patInt(1); + } + + public Pattern clone1(Hashtable h) + { + return new Any(); + } +};