// 
// Decompiled by Procyon v0.6.0
// 

package org.jline.console;

import java.util.Iterator;
import java.util.Collection;
import java.util.ArrayList;
import org.jline.utils.AttributedString;
import java.util.List;

public class ArgDesc
{
    private final String name;
    private final List<AttributedString> description;
    
    public ArgDesc(final String name) {
        this(name, new ArrayList<AttributedString>());
    }
    
    public ArgDesc(final String name, final List<AttributedString> description) {
        if (name.contains("\t") || name.contains(" ")) {
            throw new IllegalArgumentException("Bad argument name: " + name);
        }
        this.name = name;
        this.description = new ArrayList<AttributedString>(description);
    }
    
    public String getName() {
        return this.name;
    }
    
    public List<AttributedString> getDescription() {
        return this.description;
    }
    
    public static List<ArgDesc> doArgNames(final List<String> names) {
        final List<ArgDesc> out = new ArrayList<ArgDesc>();
        for (final String n : names) {
            out.add(new ArgDesc(n));
        }
        return out;
    }
}
