X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fcom%2Fstevesoft%2Fpat%2FAny.java;h=dbaa961e63b8802d94e92771fbb501ef51208a30;hb=521de3345302eb3234996733383b9e810f77699f;hp=e833662520eb3f3c0c58478fbb4c1072c33bcf33;hpb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;p=jalview.git diff --git a/src/com/stevesoft/pat/Any.java b/src/com/stevesoft/pat/Any.java index e833662..dbaa961 100755 --- a/src/com/stevesoft/pat/Any.java +++ b/src/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.Hashtable; + +/** + * 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(); + } +};