Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package org.litesoft.mementobeansupport;

import org.litesoft.commonfoundation.typeutils.*;

import java.util.*;

import org.litesoft.codec.*;

public class StringAttributeProxy extends AbstractAttributeProxy<String, StringAttributeProxy>
{
    private boolean mNullEmpties = false;

    public StringAttributeProxy( String pName )
    {
        super( pName, StringTypedTerminatingCodec.INSTANCE );
    }

    public StringAttributeProxy nullEmpties()
    {
        StringAttributeProxy zClone = copy();
        zClone.mNullEmpties = true;
        return zClone;
    }

    @Override
    protected List<String> normalize( List<String> pValues )
    {
        return mNullEmpties ? normalizeEachEntry( pValues ) : super.normalize( pValues );
    }

    @Override
    protected String normalize( String pValue )
    {
        return mNullEmpties ? Strings.noEmpty( pValue ) : super.normalize( pValue );
    }

    @Override
    protected StringAttributeProxy copy()
    {
        return new StringAttributeProxy( this );
    }

    private StringAttributeProxy( StringAttributeProxy pOrig )
    {
        super( pOrig );
        mNullEmpties = pOrig.mNullEmpties;
    }
}

Commits for litesoft/trunk/Java/core/Anywhere/src/org/litesoft/mementobeansupport/StringAttributeProxy.java

Diff revisions: vs.
Revision Author Commited Message
939 Diff Diff GeorgeS picture GeorgeS Mon 02 Jun, 2014 21:30:31 +0000

Extracting commonfoundation

814 Diff Diff GeorgeS picture GeorgeS Sat 18 Aug, 2012 17:52:17 +0000
801 Diff Diff GeorgeS picture GeorgeS Wed 15 Aug, 2012 03:59:02 +0000
779 Diff Diff GeorgeS picture GeorgeS Mon 16 Jul, 2012 04:34:33 +0000
777 Diff Diff GeorgeS picture GeorgeS Mon 16 Jul, 2012 00:48:01 +0000
772 GeorgeS picture GeorgeS Sun 15 Jul, 2012 16:55:51 +0000

!