X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fcom%2Fstevesoft%2Fpat%2FCustomEndpoint.java;h=bf122b77eef61f6176e858df4c17f9862a77e8e8;hb=c84d2601499c7d332cfd208f589686af8e3b1a20;hp=b8fc704dc50bf2bb7d6a83cb13f0fd6b073ad8f2;hpb=c40cf903f740a72ab63dd1abc10fa33450ce660d;p=jalview.git diff --git a/src/com/stevesoft/pat/CustomEndpoint.java b/src/com/stevesoft/pat/CustomEndpoint.java index b8fc704..bf122b7 100755 --- a/src/com/stevesoft/pat/CustomEndpoint.java +++ b/src/com/stevesoft/pat/CustomEndpoint.java @@ -1,27 +1,44 @@ -// -// 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 class is needed internally to make backtracking work - * correctly in user-defined patterns. - */ -class CustomEndpoint extends Pattern { - Custom c; - CustomEndpoint(Custom cm) { c = cm; } - public int matchInternal(int pos,Pthings pt) { - int npos = c.v.validate(pt.src,c.start,pos); - if(npos >= 0) - return nextMatch(npos,pt); - return -1; - } - public String toString() { return ""; } - Pattern clone1(Hashtable h) { - return new CustomEndpoint((Custom)c.clone(h)); - } -} +// +// 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 class is needed internally to make backtracking work correctly in + * user-defined patterns. + */ +class CustomEndpoint extends Pattern +{ + Custom c; + + CustomEndpoint(Custom cm) + { + c = cm; + } + + public int matchInternal(int pos, Pthings pt) + { + int npos = c.v.validate(pt.src, c.start, pos); + if (npos >= 0) + { + return nextMatch(npos, pt); + } + return -1; + } + + public String toString() + { + return ""; + } + + Pattern clone1(Hashtable h) + { + return new CustomEndpoint((Custom) c.clone(h)); + } +}