1 package org.jface.stepmt.core;
2
3
4 /***
5 * {@link Pattern}s are used to test, if a {@link String} matches a certain
6 * character pattern at a distinct position. Use {@link #match(String, int)}
7 * to determine, if <em>this</em> {@link Pattern} matches the given
8 * {@link String} at the given index.
9 * <p>
10 * For example a {@link Pattern} matches only numbers will return
11 * <tt>new Integer(4, 2)</tt> at <tt>pattern.match("Nr. 13", 4);</tt>.
12 *
13 * @author <a href="mailto:powerpete@users.sf.net">Moritz Petersen</a>
14 * @version $Id: Pattern.java,v 1.2 2004/02/07 11:24:11 powerpete Exp $
15 */
16 public interface Pattern
17 {
18 /***
19 * Returns the {@link Interval} matching this pattern at the given index.
20 *
21 * @param str The {@link String}
22 * @param index The index that is used to match the position.
23 *
24 * @return The {@link Interval} matchin this {@link Pattern} or
25 * <tt>null</tt>.
26 */
27 Interval match(String str, int index);
28
29 /***
30 * Returns the name of this {@link Pattern}.
31 *
32 * @return The name.
33 */
34 String getName();
35
36 /***
37 * Sets the name of this {@link Pattern}.
38 *
39 * @param name The name.
40 */
41 void setName(String name);
42 }
This page was automatically generated by Maven