JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / src / com / stevesoft / pat / RuleHolder.java
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 /** This class is used internally. */
11 class RuleHolder extends ReplaceRule
12 {
13   ReplaceRule held = null;
14
15   RuleHolder()
16   {
17   }
18
19   RuleHolder(ReplaceRule h)
20   {
21     held = h;
22   }
23
24   public Object clone1()
25   {
26     return new RuleHolder(held);
27   }
28
29   public String toString1()
30   {
31     return held.toString1();
32   }
33
34   public void apply(StringBufferLike sb, RegRes rr)
35   {
36     held.apply(sb, rr);
37   }
38
39   public ReplaceRule arg(String s)
40   {
41     return new RuleHolder(held.arg(s));
42   }
43 }