1 package org.apache.onami.configuration.variables;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.Map;
23
24
25
26
27
28
29 final class TextAppender extends AbstractAppender
30 {
31
32 public TextAppender( final String chunk )
33 {
34 super( chunk );
35 }
36
37 @Override
38 protected void doAppend( StringBuilder buffer, Map<String, String> configuration, Tree<Appender> context )
39 {
40 buffer.append( chunk );
41 }
42
43 @Override
44 public boolean equals( Object obj )
45 {
46 if ( obj == this )
47 {
48 return true;
49 }
50 if ( obj instanceof TextAppender )
51 {
52 TextAppender other = (TextAppender) obj;
53 return chunk != null ? chunk.equals( other.chunk ) : other.chunk == null;
54 }
55 return false;
56 }
57
58 @Override
59 public int hashCode()
60 {
61 return chunk != null ? chunk.hashCode() : 0;
62 }
63
64
65
66
67 public boolean needsResolving()
68 {
69 return false;
70 }
71
72 }