Class |
Line # |
Actions |
|||
---|---|---|---|---|---|
AmpersandRule | 15 | 2 | 3 |
1 | // | |
2 | // This software is now distributed according to | |
3 | // the Lesser Gnu Public License. Please see | |
4 | // http://www.gnu.org/copyleft/lesser.txt for | |
5 | // the details. | |
6 | // -- Happy Computing! | |
7 | // | |
8 | package com.stevesoft.pat; | |
9 | ||
10 | /** | |
11 | * This implements the $& element of the second argument to Regex. | |
12 | * | |
13 | * @see com.stevesoft.pat.ReplaceRule | |
14 | */ | |
15 | public final class AmpersandRule extends ReplaceRule | |
16 | { | |
17 | 0 | public AmpersandRule() |
18 | { | |
19 | } | |
20 | ||
21 | 0 | public void apply(StringBufferLike sb, RegRes res) |
22 | { | |
23 | 0 | sb.append(res.stringMatched()); |
24 | } | |
25 | ||
26 | 0 | public String toString1() |
27 | { | |
28 | 0 | return "$&"; |
29 | } | |
30 | } |