View Javadoc
1 // $Id: ContainerPattern.java,v 1.2 2004/02/07 11:24:04 powerpete Exp $ 2 // [JMP, 03.02.2004] Created this file. 3 package org.jface.stepmt.core.util; 4 5 import org.jface.stepmt.core.Interval; 6 import org.jface.stepmt.core.Pattern; 7 import org.jface.stepmt.core.PatternMap; 8 import org.jface.stepmt.core.patterns.AbstractPattern; 9 10 /*** 11 * @author <a href="mailto:powerpete@users.sf.net">M. Petersen</a> 12 * @version $Id: ContainerPattern.java,v 1.2 2004/02/07 11:24:04 powerpete Exp $ 13 */ 14 public class ContainerPattern extends AbstractPattern 15 { 16 private Pattern containedPattern; 17 18 ContainerPattern(final String name) 19 { 20 setName(name); 21 } 22 23 public Interval match(final String str, final int index) 24 { 25 if (containedPattern == null) 26 { 27 return null; 28 } 29 return containedPattern.match(str, index); 30 } 31 32 void resolve(final PatternMap patternMap) 33 { 34 containedPattern = patternMap.get(super.name); 35 } 36 }

This page was automatically generated by Maven