001// Licensed to the Apache License, Version 2.0 (the "License");
002// you may not use this file except in compliance with the License.
003// You may obtain a copy of the License at
004//
005//     http://www.apache.org/licenses/LICENSE-2.0
006//
007// Unless required by applicable law or agreed to in writing, software
008// distributed under the License is distributed on an "AS IS" BASIS,
009// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
010// See the License for the specific language governing permissions and
011// limitations under the License.
012
013package org.apache.tapestry5.commons;
014
015import java.util.List;
016
017/**
018 * <p>
019 * Interface that represents a parent-children relationship. It's used
020 * in the Tapestry's <code>Recursive</code> component.
021 * </p>
022 * <p>
023 * This was contributed by <a href="https://www.pubfactory.com">KGL PubFactory</a>.
024 * </p>
025 * @since 5.9.0
026 */
027public interface RecursiveValue<T> 
028{
029
030    /**
031     * Returns the list of children for a given value.
032     * @return a {@link java.util.List}.
033     */
034    List<RecursiveValue<?>> getChildren();
035    
036    /**
037     * Returns the original object related to this value.
038     * @return an {@link Object}
039     */
040    T getValue();
041    
042}