Subversion Repository Public Repository

litesoft

Diff Revisions 960 vs 961 for /trunk/DeviceDesktopTest/src/org/litesoft/template/ChunkWithKey.java

Diff revisions: vs.
  @@ -1,38 +1,27 @@
1 1 package org.litesoft.template;
2 2
3 - public class ChunkWithKey implements Chunk
4 - {
3 + public class ChunkWithKey implements Chunk {
5 4 private final String mKey;
6 5
7 6 /**
8 7 * @param pKey !null
9 8 */
10 - public ChunkWithKey( String pKey )
11 - {
9 + public ChunkWithKey( String pKey ) {
12 10 mKey = pKey;
13 11 }
14 12
15 13 @Override
16 - public void dump( Sink pWriter, ValueProvider pValueProvider )
17 - {
14 + public void dump( Sink pWriter, ValueProvider pValueProvider ) {
18 15 Object zValue = pValueProvider.valueFor( mKey );
19 - if ( zValue instanceof Chunk )
20 - {
16 + if ( zValue instanceof Chunk ) {
21 17 ((Chunk) zValue).dump( pWriter, pValueProvider );
22 - }
23 - else if ( zValue == null )
24 - {
18 + } else if ( zValue == null ) {
25 19 pWriter.write( "[" + mKey + "]" );
26 - }
27 - else
28 - {
20 + } else {
29 21 String zText = zValue.toString();
30 - if ( zText == null )
31 - {
22 + if ( zText == null ) {
32 23 pWriter.write( "[" + mKey + "...null]" );
33 - }
34 - else if ( zText.length() != 0 )
35 - {
24 + } else if ( zText.length() != 0 ) {
36 25 pWriter.write( zText );
37 26 }
38 27 }