All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine Maven / Gradle / Ivy

Go to download

Pulls down a set of libs, relocates them and then makes a fat new jar with them all in it. See below for what this miscellaney includes.

There is a newer version: 4.1.7
Show newest version
/**
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.hbase.thirdparty.org.apache.commons.cli;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;

/**
 * Represents list of arguments parsed against a {@link Options} descriptor.
 * 

* It allows querying of a boolean {@link #hasOption(String opt)}, * in addition to retrieving the {@link #getOptionValue(String opt)} * for options requiring arguments. *

* Additionally, any left-over or unrecognized arguments, * are available for further processing. * * @version $Id: CommandLine.java 1786144 2017-03-09 11:34:57Z britter $ */ public class CommandLine implements Serializable { /** The serial version UID. */ private static final long serialVersionUID = 1L; /** the unrecognized options/arguments */ private final List args = new LinkedList(); /** the processed options */ private final List

Dump state, suitable for debugging.

* * @return Stringified form of this object */ /* public String toString() { StringBuilder buf = new StringBuilder(); buf.append("[ CommandLine: [ options: "); buf.append(options.toString()); buf.append(" ] [ args: "); buf.append(args.toString()); buf.append(" ] ]"); return buf.toString(); } */ /** * Add left-over unrecognized option/argument. * * @param arg the unrecognized option/argument. */ protected void addArg(String arg) { args.add(arg); } /** * Add an option to the command line. The values of the option are stored. * * @param opt the processed option */ protected void addOption(Option opt) { options.add(opt); } /** * Returns an iterator over the Option members of CommandLine. * * @return an Iterator over the processed {@link Option} * members of this {@link CommandLine} */ public Iterator




© 2015 - 2024 Weber Informatics LLC | Privacy Policy