org.apache.wicket.request.mapper.parameter.INamedParameters Maven / Gradle / Ivy
/*
* 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.wicket.request.mapper.parameter;
import java.util.List;
import java.util.Set;
import org.apache.wicket.request.IRequestMapper;
import org.apache.wicket.request.mapper.parameter.PageParameters.NamedPair;
import org.apache.wicket.util.string.StringValue;
/**
* Container for parameters that are identified by their name
*
* @author igor
*/
public interface INamedParameters
{
/**
* Return set of all named parameter names.
*
* @return named parameter names
*/
Set getNamedKeys();
/**
* Returns parameter value of named parameter with given name
*
* @param name
* @return parameter value
*/
StringValue get(final String name);
/**
* Return list of all values for named parameter with given name
*
* @param name
* @return list of parameter values
*/
List getValues(final String name);
/**
* @return All named parameters in exact order.
*/
List getAllNamed();
/**
* Removes named parameter with given name.
*
* @param name
* @return this
*/
PageParameters remove(final String name);
/**
* Adds value to named parameter with given name.
*
* @param name
* @param value
* @return this
*/
PageParameters add(final String name, final Object value);
/**
* Adds named parameter to a specified position. The {@link IRequestMapper}s may or may not take
* the order into account.
*
* @param name
* @param value
* @param index
* @return this
*/
PageParameters add(final String name, final Object value, final int index);
/**
* Sets the named parameter on specified position. The {@link IRequestMapper}s may or may not
* take the order into account.
*
* @param name
* @param value
* @param index
* @return this
*/
PageParameters set(final String name, final Object value, final int index);
/**
* Sets the value for named parameter with given name.
*
* @param name
* @param value
* @return this
*/
PageParameters set(final String name, final Object value);
/**
* Removes all named parameters.
*
* @return this
*/
PageParameters clearNamed();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy