-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable
public interface Neighborhood<T> implements Serializable, Cloneable, Iterable<Node<T>>
The type which describes the concentration of a molecule Interface for a neighborhood. When implementing it in a real class, please remember to correctly implement also the equals method inherited from Object.
-
-
Method Summary
Modifier and Type Method Description abstract Neighborhood<T>add(Node<T> node)abstract booleancontains(Node<T> n)Verifies if a node is contained inside a neighborhood. abstract Node<T>getCenter()Allows to access the central node. abstract Node<T>getNeighborByNumber(int num)Returns the num-th neighbor. abstract ListSet<out Node<T>>getNeighbors()Allows to directly access every node in the neighborhood. abstract booleanisEmpty()abstract Neighborhood<T>remove(Node<T> node)abstract intsize()-
-
Method Detail
-
contains
abstract boolean contains(Node<T> n)
Verifies if a node is contained inside a neighborhood.
- Parameters:
n- the node to be searched
-
getNeighborByNumber
@Deprecated() abstract Node<T> getNeighborByNumber(int num)
Returns the num-th neighbor.
- Parameters:
num- the neighbor index
-
getNeighbors
abstract ListSet<out Node<T>> getNeighbors()
Allows to directly access every node in the neighborhood. A change of this List will be reflected in the neighborhood.
-
isEmpty
abstract boolean isEmpty()
-
size
abstract int size()
-
-
-
-