Interface InfrastructureLayers

    • Method Detail

      • remove

        InfrastructureLayer remove​(long id)
        Remove by id
        Parameters:
        id - to remove entity for
        Returns:
        removed instance (if any), otherwise null
      • createNew

        MacroscopicPhysicalNetwork createNew()
        Create a new infrastructure layer (without registering on this class). Currently we only support macroscopic infrastructure layers so the returned type is the derived class MacroscopicPhysicalNetwork. In future versions the user can choose which type is to be created
        Returns:
        created infrastructure layer
      • registerNew

        MacroscopicPhysicalNetwork registerNew()
        Create a new infrastructure layer and registering on this class. Currently we only support macroscopic infrastructure layers so the returned type is the derived class MacroscopicPhysicalNetwork. In future versions the user can choose which type is to be created
        Returns:
        created infrastructure layer
      • register

        InfrastructureLayer register​(InfrastructureLayer entity)
        Add to the container
        Parameters:
        entity - to be registered in this network
        Returns:
        entity, in case it overrides an existing entry, the removed entry is returned
      • size

        int size()
        Return number of registered entity
        Returns:
        number of registered entity
      • isNoLayers

        default boolean isNoLayers()
        When there are no layers the instance is considered empty
        Returns:
        true when no layers exist yet, false otherwise
      • isEachLayerEmpty

        default boolean isEachLayerEmpty()
        check if each layer itself is empty
        Returns:
        true when all empty false otherwise
      • get

        InfrastructureLayer get​(long id)
        Find a entity by its id
        Parameters:
        id - Id of entity
        Returns:
        retrieved entity
      • get

        InfrastructureLayer get​(Mode mode)
        Find the layer that supports the passed in mode. Since a mode is only allowed to be supported by a single layer, this should yield the correct result. If multiple layers support the same mode for some reason, this method returns the first layer that supports the mode
        Parameters:
        mode - to find the layer for
        Returns:
        first matching layer
      • getFirst

        default InfrastructureLayer getFirst()
        collect the first layer present based on the iterator
        Returns:
        first available layer, null if no layers are present