/*
 * @(#)PositionedParameterOption.java
 *
 * Copyright (c) 2002-2003 JSCAPE
 * 1147 S. 53rd Pl., Mesa, Arizona, 85206, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * JSCAPE. ("Confidential Information").  You shall not disclose such
 * Confidential Information and shall use it only in accordance with
 * the terms of the license agreement you entered into with JSCAPE.
 */

package com.jscape.util.cli;

/**
 * @author Alex
 * @version 1.0
 * @see <a href="PositionedOption.java.html">Source code</a>
 */
public class PositionedParameterOption
        extends AbstractOption {

    /**
     * @param name     name
     * @param position position
     */
    public PositionedParameterOption(String name, int position) {
        super(name, true, position);
    }

    /**
     * @param name     name
     * @param required required
     * @param position position
     */
    public PositionedParameterOption(String name, boolean required, int position) {
        super(name, required, position);
    }

    /**
     * @param option option
     *
     * @return boolean value
     *
     * @see com.jscape.util.cli.AbstractOption#found(String)
     */
    protected boolean found(String option) {
        return true;
    }

    /**
     * @return String instance
     *
     * @see com.jscape.util.cli.AbstractOption#getOptionString()
     */
    protected String getOptionString() {
        return this.required ? (OPEN_PARAMETER_BRACE + this.name + CLOSE_PARAMETER_BRACE) : super.getOptionString();
    }

}
