Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (C) 2010-2019, Danilo Pianini and contributors listed in the main project's alchemist/build.gradle file.
*
* This file is part of Alchemist, and is distributed under the terms of the
* GNU General Public License, with a linking exception,
* as described in the file LICENSE in the Alchemist distribution's top directory.
*/
package it.unibo.alchemist.model.implementations.conditions;
import it.unibo.alchemist.expressions.implementations.NumTreeNode;
import it.unibo.alchemist.expressions.interfaces.IExpression;
import it.unibo.alchemist.expressions.interfaces.ITreeNode;
import it.unibo.alchemist.model.implementations.molecules.LsaMolecule;
import it.unibo.alchemist.model.interfaces.Context;
import it.unibo.alchemist.model.interfaces.Environment;
import it.unibo.alchemist.model.interfaces.ILsaMolecule;
import it.unibo.alchemist.model.interfaces.ILsaNode;
import it.unibo.alchemist.model.interfaces.Node;
import it.unibo.alchemist.model.interfaces.Reaction;
import org.danilopianini.lang.HashString;
import java.util.AbstractSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
/**
*/
public final class LsaNeighborhoodCondition extends LsaStandardCondition {
private static final long serialVersionUID = 5472803597473997104L;
private final Environment, ?> environment;
/**
* @param node the node
* @param molecule the molecule
* @param environment the environment
*/
public LsaNeighborhoodCondition(
final ILsaNode node,
final ILsaMolecule molecule,
final Environment, ?> environment
) {
super(molecule, node);
this.environment = environment;
}
@Override
public LsaNeighborhoodCondition cloneCondition(final Node> node, final Reaction> r) {
return new LsaNeighborhoodCondition((ILsaNode) node, getMolecule(), environment);
}
@Override
public boolean filter(
final List