Class ConnectoidsImpl

    • Constructor Detail

      • ConnectoidsImpl

        public ConnectoidsImpl​(IdGroupingToken idToken)
        Constructor
        Parameters:
        idToken - to use
    • Method Detail

      • register

        public Connectoid register​(Connectoid connectoid)
        register a connectoid If new connectoid overrides an existing connectoid, the removed connectoid is returned
        Specified by:
        register in interface Connectoids
        Parameters:
        connectoid - the connectoid to be registered
        Returns:
        connectoid added
      • registerNew

        public UndirectedConnectoid registerNew​(Node accessNode,
                                                Zone parentZone,
                                                double length)
                                         throws PlanItException
        Create new connectoid for a zone and physical access node
        Specified by:
        registerNew in interface Connectoids
        Parameters:
        accessNode - node providing access to network layer
        parentZone - of the connectoid
        length - length of connectoid
        Returns:
        registered connectoid
        Throws:
        PlanItException - thrown if error
      • registerNew

        public UndirectedConnectoid registerNew​(Node accessNode)
                                         throws PlanItException
        Create new connectoid for a physical access node and leave the connections for access zones for later
        Specified by:
        registerNew in interface Connectoids
        Parameters:
        accessNode - node providing access to network layer
        Returns:
        registered connectoid
        Throws:
        PlanItException - thrown if error
      • registerNew

        public DirectedConnectoid registerNew​(LinkSegment accessLinkSegment,
                                              Zone parentZone,
                                              double length)
                                       throws PlanItException
        Create new connectoid for a zone and physical access node
        Specified by:
        registerNew in interface Connectoids
        Parameters:
        accessLinkSegment - link segment providing access to network layer
        parentZone - of the connectoid
        length - length of connectoid
        Returns:
        registered connectoid
        Throws:
        PlanItException - thrown if error
      • registerNew

        public DirectedConnectoid registerNew​(LinkSegment accessLinkSegment,
                                              Zone parentZone)
                                       throws PlanItException
        Create new connectoid for a zone and physical access edge segment
        Specified by:
        registerNew in interface Connectoids
        Parameters:
        accessLinkSegment - link segment providing access to network layer
        parentZone - of the connectoid
        Returns:
        registered connectoid
        Throws:
        PlanItException - thrown if error
      • registerNew

        public DirectedConnectoid registerNew​(LinkSegment accessLinkSegment)
                                       throws PlanItException
        Create new connectoid for a physical access node and leave the connections for access zones for later
        Specified by:
        registerNew in interface Connectoids
        Parameters:
        accessLinkSegment - link segment providing access to network layer
        Returns:
        registered connectoid
        Throws:
        PlanItException - thrown if error
      • get

        public Connectoid get​(long id)
        Get connectoid by id
        Specified by:
        get in interface Connectoids
        Parameters:
        id - the id of this connectoid
        Returns:
        the retrieved connectoid
      • size

        public int size()
        Return number of connectoids
        Specified by:
        size in interface Connectoids
        Returns:
        the number of connectoids