Common back end for OptionHelper handleFileManagerOption.
@param option the option whose value to be set
@param value the value for the option
@return true if successful, and false otherwise
183026
public boolean handleOption(Option option, String value) {
        switch (option) {
            case ENCODING:
                encodingName = value;
                return true;

            case MULTIRELEASE:
                multiReleaseValue = value;
                locations.setMultiReleaseValue(value);
                return true;

            default:
                return locations.handleOption(option, value);
        }
    }
1243237
public OptionBuilder wantsArgument( String value )
    {
        if (option.wantsArg()) throw new IllegalArgumentException( "Argument pattern given twice" );
        option.setArg( value );
        return this;
    }
1163425
public boolean hasValueEnabled(String value) {
        for (OptionGroup group : optionGroups.values()) {
            if (group.hasValueEnabled(value)) {
                return true;
            }
        }

        return false;
    }
141823
protected static boolean argIsOption(String arg, String option) {
        return arg.equalsIgnoreCase(option) || arg.equalsIgnoreCase('-' + option);
    }
1020937
@Override
  protected Object getOptionValue(Queue<String> argq) {
    String name = argq.remove();
    File file = new File(name);
    if (mustExist && !file.isFile()) {
      System.err.println("File does not exist: '" + name + "'");
      System.exit(1);
    }
    return file;
  }
1053942
static <T> boolean setOption(Channel jdkChannel, NioChannelOption<T> option, T value) {
        java.nio.channels.NetworkChannel channel = (java.nio.channels.NetworkChannel) jdkChannel;
        if (!channel.supportedOptions().contains(option.option)) {
            return false;
        }
        if (channel instanceof ServerSocketChannel && option.option == java.net.StandardSocketOptions.IP_TOS) {
            // Skip IP_TOS as a workaround for a JDK bug:
            // See http://mail.openjdk.java.net/pipermail/nio-dev/2018-August/005365.html
            return false;
        }
        try {
            channel.setOption(option.option, value);
            return true;
        } catch (IOException e) {
            throw new ChannelException(e);
        }
    }
680840
public <T> ClientFactoryBuilder channelOption(ChannelOption<T> option, T value) {
        requireNonNull(option, "option");
        checkArgument(!PROHIBITED_SOCKET_OPTIONS.contains(option),
                      "prohibited socket option: %s", option);

        channelOptions.put(option, requireNonNull(value, "value"));
        return this;
    }
510618
public static boolean isFilePath(Object value)
    {
        // nullでないこと
        if (value == null)
        {
            return false;
        }

        // String型であること
        if (String.class.isAssignableFrom(value.getClass()) == false)
        {
            return false;
        }

        // 空文字でないこと
        String valueString = (String) value;
        if (StringUtils.isEmpty(valueString))
        {
            return false;
        }

        return true;
    }
581988
public void setParamTabDiCopyFileMode(String value) {

        try {
            m_userSettings.setDialogCopyFileMode(CmsResourceCopyMode.valueOf(Integer.parseInt(value)));
        } catch (Throwable t) {
            // should usually never happen
        }
    }
84750
public <T> B option(ClientOption<T> option, T value) {
        requireNonNull(option, "option");
        requireNonNull(value, "value");
        return option(option.newValue(value));
    }
1150576
protected boolean processLine(final CommandLine line, final Options options)
            throws Exception {
        if (line.hasOption("version")) {
            System.out.println("version " + getVersion());
            return false;
        }
        if (line.hasOption("help")) {
            produceHelp(options);
            return false;
        }
        if (line.hasOption("config")) {
            setConfigFile(line.getOptionValue("config").trim());
        }
        if (line.hasOption("input")) {
            setInput(line.getOptionValue("input").trim());
        }
        if (line.hasOption("inputEncoding")) {
            setInputEncoding(line.getOptionValue("inputEncoding").trim());
        }
        if (line.hasOption("output")) {
            setOutput(line.getOptionValue("output").trim());
        }
        if (line.hasOption("targetNamespacePrefix")) {
            setTargetNamespacePrefix(line.getOptionValue(
                    "targetNamespacePrefix").trim());
        }
        if (line.hasOption("xsltFileName")) {
            setXsltFileName(line.getOptionValue(
                    "xsltFileName").trim());
        }

        return true;
    }
793069
private function setOptionValue(Option $Option, $value) {
        $Option->setValue($value);
        $long = $Option->getLong();
        if (isset($this->events[$long])) {
            $Handler = $this->events[$long];
            $Handler($long, $value);
        }
    }
720643
public static boolean
check(String option) {
	if (table == null)
		return false;
	return (table.get(option.toLowerCase()) != null);
}
150433
@TimerJ
    public IndexMetadataBuilder addOption(String option, Boolean value) {
        if (options == null) {
            options = new HashMap<Selector, Selector>();
        }
        options.put(new StringSelector(option), new BooleanSelector(value));
        return this;
    }
110304
public void setOutputFile (final File value)
  {
    if (value != null && !value.isAbsolute ())
    {
      throw new IllegalArgumentException ("path is not absolute: " + value);
    }
    this.outputFile = value;
  }
105160
public OptionGroup removeOption(String value) {
        if (value == null) {
            value = "";
        }

        options.remove(value);
        return this;
    }
960109
protected boolean _setProperty(String name, Object value) throws SAXNotSupportedException{
        if(LEXICAL_HANDLER.equals(name) || LEXICAL_HANDLER_ALT.equals(name)){
            if(value==null || value instanceof LexicalHandler){
                handler.setLexicalHandler((LexicalHandler)value);
                return true;
            }else
                throw new SAXNotSupportedException("value must implement "+LexicalHandler.class);
        }else if(DECL_HANDLER.equals(name) || DECL_HANDLER_ALT.equals(name)){
            if(value==null || value instanceof DeclHandler){
                handler.setDeclHandler((DeclHandler)value);
                return true;
            }else
                throw new SAXNotSupportedException("value must implement "+DeclHandler.class);
        }else
            return false;
    }