@@ -0,0 +1,1502 @@
+/*%0A * Copyright 2016 Will Knez %3Cwbknez.dev@gmail.com%3E%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.solsticesquared.schelling.utility;%0A%0Aimport com.solsticesquared.schelling.Agent;%0Aimport com.solsticesquared.schelling.SchellingExplorer;%0A%0A/**%0A * Represents a mechanism for computing the %22happiness%22 of an arbitrary agent%0A * with her current neighborhood.%0A */%0Apublic interface UtilityEvaluator %7B%0A%0A    /**%0A     * Computes the %22happiness%22 of the specified agent with her current%0A     * neighborhood according to some arbitrary logic.%0A     *%0A     * @param agent%0A     *        The agent whose neighborhood needs to be evaluated.%0A     * @param model%0A     *        The model to use.%0A     * @return The percentage of same-group neighbors (relative to an agent)%0A     * in a given neighborhood.%0A     * @throws NullPointerException%0A     *         If either %7B@code agent%7D or %7B@code model%7D is %7B@code null%7D.%0A     */%0A    double evaluate(final Agent agent, final SchellingExplorer model);%0A%7D%0A

Add mechanism for an agent to compute her happiness with her current neighborhood.