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

org.ocpsoft.rewrite.param.ParameterStore Maven / Gradle / Ivy

/*
 * Copyright 2013 Lincoln Baxter, III
 * 
 * Licensed 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.ocpsoft.rewrite.param;

import java.util.Map.Entry;

import org.ocpsoft.rewrite.config.Rule;

/**
 * A store which retains the central index of {@link Parameter} instances for {@link Rule} configuraion.
 */
public interface ParameterStore extends Iterable>>
{
   /**
    * Get the {@link Parameter} with the given name.
    * 
    * @throws IllegalArgumentException if the {@link Parameter} with the given name does not exist.
    */
   public Parameter get(String name) throws IllegalArgumentException;

   /**
    * Retrieve the {@link Parameter} with the given name, otherwise use the default, if supplied.
    * 
    * @throws IllegalArgumentException if the {@link Parameter} with the given name does not exist and no default was
    *            supplied.
    */
   public Parameter get(final String name, Parameter deflt);

   /**
    * Return true if this {@link ParameterStore} is empty, otherwise return false.
    */
   public boolean isEmpty();

   /**
    * Return the number of {@link Parameter} instances in this {@link ParameterStore}.
    */
   public int size();

   /**
    * Return true if this {@link ParameterStore} contains a {@link Parameter} with the given name,
    * otherwise return false.
    */
   public boolean contains(String name);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy