/// <seealso cref="M:ILOG.J2CsMapping.RegEx.AbstractSet.Matches(System.Int32, System.String, ILOG.J2CsMapping.RegEx.MatchResultImpl)"/>
 public override int Matches(int stringIndex, String testString,
                             MatchResultImpl matchResult)
 {
     if (stringIndex == matchResult.GetPreviousMatchEnd())
     {
         return(next.Matches(stringIndex, testString, matchResult));
     }
     return(-1);
 }
Exemple #2
0
        /// @com.intel.drl.spec_ref
        public Matcher UsePattern(Pattern pat_0)
        {
            if (pat_0 == null)
            {
                throw new ArgumentException("regex.1B");
            }
            int startIndex = matchResult.GetPreviousMatchEnd();
            int mode       = matchResult.Mode();

            this.pat    = pat_0;
            this.start  = pat_0.start;
            matchResult = new MatchResultImpl(this.str0, leftBound, rightBound,
                                              pat_0.GroupCount(), pat_0.CompCount(), pat_0.ConsCount());
            matchResult.SetStartIndex(startIndex);
            matchResult.SetMode(mode);
            return(this);
        }