Package 

Class GenericGroup

  • All Implemented Interfaces:
    it.unibo.alchemist.model.interfaces.Group

    
    public class GenericGroup<T extends Object, N extends Node<T>>
     implements Group<T, N>
                        

    Basic implementation of a group.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final List<N> members
    • Constructor Summary

      Constructors 
      Constructor Description
      GenericGroup()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      List<N> getMembers()
      Group<T, N> addMember(N node) Add a node in this group if not already part of it.
      Group<T, N> removeMember(N node) Remove a node from this group.
      • Methods inherited from class it.unibo.alchemist.model.implementations.groups.GenericGroup

        contains
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GenericGroup

        GenericGroup()
    • Method Detail

      • addMember

         Group<T, N> addMember(N node)

        Add a node in this group if not already part of it.

        Parameters:
        node -
            the node to add.
      • removeMember

         Group<T, N> removeMember(N node)

        Remove a node from this group.

        Parameters:
        node -
            the node to remove.