Subversion Repositories DevTools

Rev

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

Rev 6914 Rev 7333
Line 16... Line 16...
16
    /** Re-init the command list
16
    /** Re-init the command list
17
     *  Discards the current Array List and start again
17
     *  Discards the current Array List and start again
18
     *  
18
     *  
19
     *  @param argList           - Variable number of string arguments
19
     *  @param argList           - Variable number of string arguments
20
     */
20
     */
21
    public void init(String... argList)
21
    public CommandBuilder init(String... argList)
22
    {
22
    {
23
        cmd.clear();
23
        cmd.clear();
24
        add(argList);
24
        add(argList);
-
 
25
        return this;
25
    }
26
    }
26
    
27
    
27
    /** Add one or more strings to the command
28
    /** Add one or more strings to the command
28
     * 
29
     * 
29
     * @param argList           - Variable number of string arguments
30
     * @param argList           - Variable number of string arguments
30
     */
31
     */
31
    public void add( String... argList )
32
    public CommandBuilder add( String... argList )
32
    {
33
    {
33
        for(String c: argList)
34
        for(String c: argList)
34
        {
35
        {
35
            cmd.add(c);
36
            cmd.add(c);
36
        }
37
        }
-
 
38
        return this;
37
    }
39
    }
38
    
40
    
39
    /** Conditionally add one or more strings to the command
41
    /** Conditionally add one or more strings to the command
40
     * 
42
     * 
41
     * @param enable            - If true then add the commands
43
     * @param enable            - If true then add the commands
42
     * @param argList           - Variable number of string arguments
44
     * @param argList           - Variable number of string arguments
43
     */
45
     */
44
    public void add( Boolean enable, String... argList )
46
    public CommandBuilder add( Boolean enable, String... argList )
45
    {
47
    {
46
        if (enable)
48
        if (enable)
47
        {
49
        {
48
            add(argList);
50
            add(argList);
49
        }
51
        }
-
 
52
        return this;
50
    }
53
    }
51
    
54
    
52
    /** Convert the command fragments into a string
55
    /** Convert the command fragments into a string
53
     *  The argument are space-separated
56
     *  The argument are space-separated
54
     */
57
     */