X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcom%2Fstevesoft%2Fpat%2FCustomEndpoint.java;h=9608f7ef0faae42e625ccfe0a9a77b08ae4aba70;hb=506d60f0e188723ddc91c26824b41ac7034df3fe;hp=ac6c4ba801f65c046c55688d5d88e7ce11222301;hpb=60f2d6c034560415fd0139c8bc7df0c19cae1186;p=jalview.git diff --git a/src/com/stevesoft/pat/CustomEndpoint.java b/src/com/stevesoft/pat/CustomEndpoint.java index ac6c4ba..9608f7e 100755 --- a/src/com/stevesoft/pat/CustomEndpoint.java +++ b/src/com/stevesoft/pat/CustomEndpoint.java @@ -1,43 +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.*; - -/** 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.*; + +/** + * 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)); + } +}