Subversion Repositories DevTools

Rev

Rev 6914 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6914 Rev 7333
Line 1... Line 1...
1
package com.erggroup.buildtool.utilities;
1
package com.erggroup.buildtool.utilities;
-
 
2
 
-
 
3
import java.util.Iterator;
-
 
4
 
2
/**
5
/**
3
 * 
6
 * 
4
 * Class to simplify the appending of text to a string
7
 * Class to simplify the appending of text to a string
5
 * Will append text with a configurable 'joiner'
8
 * Will append text with a configurable 'joiner'
6
 * 
9
 * 
Line 36... Line 39...
36
        skip = false;
39
        skip = false;
37
        this.text.append(text);
40
        this.text.append(text);
38
        return this;
41
        return this;
39
    }
42
    }
40
    
43
    
-
 
44
    /**
-
 
45
     * Append a Set/List of strings (Sort of like a join)
-
 
46
     * @param itr - to iterate over the collection of strings
-
 
47
     * @return
-
 
48
     */
-
 
49
    public StringAppender append(Iterator<String> itr)
-
 
50
    {
-
 
51
        while(itr.hasNext()){
-
 
52
            append(itr.next());
-
 
53
          }
-
 
54
        return this;
-
 
55
    }
-
 
56
 
41
    public String toString()
57
    public String toString()
42
    {
58
    {
43
        return text.toString();
59
        return text.toString();
44
    }
60
    }
45
    
61