package com.lhkbob.entreri;

/**
 * <p>
 * Result represents a computed result, preferably that of a bulk computation,
 * performed by a Controller. Results allow Controllers to easily pass data to
 * other controllers that might be interested in their computations.
 * </p>
 * <p>
 * Controllers that wish to expose results must define an interface that is
 * capable of receiving their computations. The signature of this method is
 * entirely up to the Controller. Then, the controller wraps the computed
 * results in an internal Result implementation that knows how to invoke the
 * listener interface defined previously with the just computed data. To provide
 * to all interested Controllers, the {@link ControllerManager#supply(Result)}
 * method can be used.
 * </p>
 * <p>
 * To receive computed results, Controllers merely have to implement the
 * listener interfaces defined by the controllers of interest and store the
 * supplied results.
 * </p>
 * 
 * @author Michael Ludwig
 * @param <T> The listener type
 */
public interface Result<T> {
    /**
     * <p>
     * Supply this result to the provided listener of type T. It is expected
     * that a listener interface will define some method that enables compatible
     * Result implementations to inject the computed data.
     * </p>
     * <p>
     * This injection or supplying is performed by this method. Controllers that
     * compute results will define interfaces as appropriate to receive their
     * results, and result implementations to provide those results.
     * </p>
     * 
     * @param listener The listener to receive the event
     */
    public void supply(T listener);
    
    /**
     * @return The listener interface this result is supplied to
     */
    public Class<T> getListenerType();
}

@@ -1,8 +1,1449 @@
+/*%0A * Entreri, an entity-component framework in Java%0A *%0A * Copyright (c) 2012, Michael Ludwig%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without modification,%0A * are permitted provided that the following conditions are met:%0A *%0A *     Redistributions of source code must retain the above copyright notice,%0A *         this list of conditions and the following disclaimer.%0A *     Redistributions in binary form must reproduce the above copyright notice,%0A *         this list of conditions and the following disclaimer in the%0A *         documentation and/or other materials provided with the distribution.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS %22AS IS%22 AND%0A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED%0A * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE%0A * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR%0A * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES%0A * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;%0A * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON%0A * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS%0A * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A
 package 

Update license header.