// Path: rfc3986-uri/src/main/java/org/dmfs/rfc3986/parameters/Parameter.java
// public interface Parameter
// {
//     /**
//      * Returns the name of the parameter.
//      *
//      * @return The parameter name,
//      */
//     CharSequence name();
// 
//     /**
//      * Returns the text value of the parameter.
//      *
//      * @return A {@link CharSequence} containing the parameter value in its text form.
//      */
//     CharSequence textValue();
// }
// 
// Path: rfc3986-uri/src/main/java/org/dmfs/rfc3986/parameters/ParameterList.java
// public interface ParameterList extends Iterable<Parameter>
// {
// }
// 
// Path: rfc3986-uri/src/main/java/org/dmfs/rfc3986/parameters/ParameterType.java
// public interface ParameterType<T>
// {
//     /**
//      * Returns the name of the parameter.
//      *
//      * @return
//      */
//     CharSequence name();
// 
//     /**
//      * Returns the parsed value of the given {@link Parameter}.
//      *
//      * @param parameter
//      *         The {@link Parameter} to parse.
//      *
//      * @return
//      */
//     T value(Parameter parameter);
// 
//     /**
//      * Returns a parameter of this type with the given value.
//      *
//      * @param value
//      *
//      * @return
//      */
//     Parameter parameter(T value);
// }


import org.dmfs.iterators.AbstractConvertedIterator;
import org.dmfs.iterators.AbstractFilteredIterator;
import org.dmfs.iterators.ConvertedIterator;
import org.dmfs.iterators.FilteredIterator;
import org.dmfs.rfc3986.parameters.Parameter;
import org.dmfs.rfc3986.parameters.ParameterList;
import org.dmfs.rfc3986.parameters.ParameterType;
import java.util.Iterator;
/*
 * Copyright 2017 dmfs GmbH
 *
 * 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.dmfs.rfc3986.parameters.adapters;




/**
 * The values of a {@link Parameter} that may be present any number of times.
 *
 * @author Marten Gajda
 */
public final class MultiParameter<V> implements Iterable<V>
{
    private final ParameterType<V> mParameterType;
    private final Iterable<Parameter> mDelegate;


    public MultiParameter(ParameterType<V> parameterType, ParameterList delegate)
    {
        mParameterType = parameterType;
// Path: rfc3986-uri/src/main/java/org/dmfs/rfc3986/parameters/Parameter.java
// public interface Parameter
// {
//     /**
//      * Returns the name of the parameter.
//      *
//      * @return The parameter name,
//      */
//     CharSequence name();
// 
//     /**
//      * Returns the text value of the parameter.
//      *
//      * @return A {@link CharSequence} containing the parameter value in its text form.
//      */
//     CharSequence textValue();
// }
// 
// Path: rfc3986-uri/src/main/java/org/dmfs/rfc3986/parameters/ParameterList.java
// public interface ParameterList extends Iterable<Parameter>
// {
// }
// 
// Path: rfc3986-uri/src/main/java/org/dmfs/rfc3986/parameters/ParameterType.java
// public interface ParameterType<T>
// {
//     /**
//      * Returns the name of the parameter.
//      *
//      * @return
//      */
//     CharSequence name();
// 
//     /**
//      * Returns the parsed value of the given {@link Parameter}.
//      *
//      * @param parameter
//      *         The {@link Parameter} to parse.
//      *
//      * @return
//      */
//     T value(Parameter parameter);
// 
//     /**
//      * Returns a parameter of this type with the given value.
//      *
//      * @param value
//      *
//      * @return
//      */
//     Parameter parameter(T value);
// }


// Path: rfc3986-uri/src/main/java/org/dmfs/rfc3986/parameters/adapters/MultiParameter.java
import org.dmfs.iterators.AbstractConvertedIterator;
import org.dmfs.iterators.AbstractFilteredIterator;
import org.dmfs.iterators.ConvertedIterator;
import org.dmfs.iterators.FilteredIterator;
import org.dmfs.rfc3986.parameters.Parameter;
import org.dmfs.rfc3986.parameters.ParameterList;
import org.dmfs.rfc3986.parameters.ParameterType;
import java.util.Iterator;

/*
 * Copyright 2017 dmfs GmbH
 *
 * 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.dmfs.rfc3986.parameters.adapters;




/**
 * The values of a {@link Parameter} that may be present any number of times.
 *
 * @author Marten Gajda
 */
public final class MultiParameter<V> implements Iterable<V>
{
    private final ParameterType<V> mParameterType;
    private final Iterable<Parameter> mDelegate;


    public MultiParameter(ParameterType<V> parameterType, ParameterList delegate)
    {
        mParameterType = parameterType;
        mDelegate = delegate;