/**
 * Copyright 2011-2016 Asakusa Framework Team.
 *
 * 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 com.asakusafw.runtime.core;

import java.util.List;

/**
 * Represents a data-flow view, which partitioned by each sorted group.
 * Application developers <em>MUST NOT</em> change the returned lists and their elements.
 * @param <T> the data type
 * @since 0.9.1
 */
public interface GroupView<T> extends View<T> {

    /**
     * Returns a data model list for the empty key.
     * @return the data model list for the empty key, or an empty list there is no such entries for the key
     */
    default List<T> find() {
        return find(new Object[0]);
    }

    /**
     * Returns a data model list for the key.
     * @param key the search key element
     * @return the data model list for the key, or an empty list there is no such entries for key
     */
    default List<T> find(Object key) {
        return find(new Object[] { key });
    }

    /**
     * Returns a data model list for the key elements.
     * @param a the first key element
     * @param b the second key element
     * @return the data model list for the key, or an empty list there is no such entries for key
     */
    default List<T> find(Object a, Object b) {
        return find(new Object[] { a, b });
    }

    /**
     * Returns a data model list for the key elements.
     * @param a the first key element
     * @param b the second key element
     * @param c the third key element
     * @return the data model list for the key, or an empty list there is no such entries for key
     */
    default List<T> find(Object a, Object b, Object c) {
        return find(new Object[] { a, b, c });
    }

    /**
     * Returns a data model list for the key elements.
     * @param a the first key element
     * @param b the second key element
     * @param c the third key element
     * @param d the fourth key element
     * @return the data model list for the key, or an empty list there is no such entries for key
     */
    default List<T> find(Object a, Object b, Object c, Object d) {
        return find(new Object[] { a, b, c, d });
    }

    /**
     * Returns a data model list for the key elements.
     * @param elements the key elements
     * @return the data model list for the key, or an empty list there is no such entries for key
     */
    List<T> find(Object... elements);
}

@@ -1094,32 +1094,145 @@
 for the key%0A
+     * @throws IllegalArgumentException if the key structure is not compatible for this view (optional behavior)%0A
      */%0A
     default 
@@ -1211,32 +1211,32 @@
 havior)%0A     */%0A
-
     default List
@@ -1476,32 +1476,145 @@
 entries for key%0A
+     * @throws IllegalArgumentException if the key structure is not compatible for this view (optional behavior)%0A
      */%0A    defa
@@ -1924,32 +1924,145 @@
 entries for key%0A
+     * @throws IllegalArgumentException if the key structure is not compatible for this view (optional behavior)%0A
      */%0A    defa
@@ -2419,32 +2419,145 @@
 entries for key%0A
+     * @throws IllegalArgumentException if the key structure is not compatible for this view (optional behavior)%0A
      */%0A    defa
@@ -2966,32 +2966,145 @@
 entries for key%0A
+     * @throws IllegalArgumentException if the key structure is not compatible for this view (optional behavior)%0A
      */%0A    defa
@@ -3322,16 +3322,16 @@
 lements%0A
-
      * @
@@ -3416,24 +3416,137 @@
 ies for key%0A
+     * @throws IllegalArgumentException if the key structure is not compatible for this view (optional behavior)%0A
      */%0A    

Add optional constraint for GroupView.