Beispiel #1
0
        /// <summary>
        /// Returns the option value for an option.
        /// </summary>
        /// <param name="option">	an option object
        /// @return	 the option value for an option, <i>null</i> if the option value could not be found. </param>
        /// <exception cref="OptionException"> </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public Object getOptionValue(org.maltparser.core.options.option.Option option) throws OptionException
        public virtual object getOptionValue(Option.Option option)
        {
            if (optionContainers.Count == 0)
            {
                return(null);
            }
            OptionContainer oc = optionContainers[optionContainers.firstKey()];

            return(oc.getOptionValue(option));
        }
Beispiel #2
0
        /// <summary>
        /// Returns the option value for an option that is in a specific option container.
        /// </summary>
        /// <param name="containerIndex">	the index of the option container. </param>
        /// <param name="option">	the option object
        /// @return	an object that contains the value of the option, <i>null</i> if the option value could not be found. </param>
        /// <exception cref="OptionException"> </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public Object getOptionValue(int containerIndex, org.maltparser.core.options.option.Option option) throws OptionException
        public virtual object getOptionValue(int containerIndex, Option.Option option)
        {
            OptionContainer oc = optionContainers[containerIndex];

            if (oc == null)
            {
                throw new OptionException("The option container '" + containerIndex + "' cannot be found. ");
            }
            return(oc.getOptionValue(option));
        }