Interface Connectoid

    • Field Detail

      • DEFAULT_LENGTH_KM

        static final double DEFAULT_LENGTH_KM
        Default connectoid length in km
        See Also:
        Constant Field Values
      • DEFAULT_CONNECTOID_TYPE

        static final ConnectoidType DEFAULT_CONNECTOID_TYPE
        default type is set to none
    • Method Detail

      • setName

        void setName​(String name)
        Set the name of the connectoid
        Parameters:
        name - its name
      • getName

        String getName()
        The name of the connectoid
        Returns:
        its name
      • setType

        void setType​(ConnectoidType type)
        Set the type of the connectoid
        Parameters:
        type - its type
      • getType

        ConnectoidType getType()
        The type of the connectoid
        Returns:
        its type
      • getAccessZones

        Collection<Zone> getAccessZones()
        the zones that can be accessed by this connectoid
        Returns:
        accessible zones
      • setLength

        void setLength​(Zone zone,
                       double length)
        add an access zone and provide length to this connectoid
        Parameters:
        zone - to set length for
        length - to traverse between connectoid and zone
      • addAllowedMode

        void addAllowedMode​(Zone zone,
                            Mode... allowedModes)
        add an allowed mode to the already
        Parameters:
        zone - to add allowed mode(s) to
        allowedModes - to add
      • addAccessZone

        Zone addAccessZone​(Zone zone)
        add an access zone with default properties
        Parameters:
        zone - to register as accessible
        Returns:
        overwritten zone if any
      • hasAccessZone

        boolean hasAccessZone​(Zone accessZone)
        check if zone is registered as access zone
        Parameters:
        accessZone - to verify
        Returns:
        true when registered, false otherwise
      • getFirstAccessZone

        Zone getFirstAccessZone()
        first available zone that is accessible based on the first entry the iterator returns
        Returns:
        first available zone
      • getNumberOfAccessZones

        long getNumberOfAccessZones()
        the number of accessible zones registered
        Returns:
        number of accessible zones
      • getLength

        Double getLength​(Zone accessZone)
                  throws PlanItException
        length can be used to virtually assign a length to the connectoid/zone combination
        Parameters:
        accessZone - to collect length for
        Returns:
        length (null if zone is not registered)
        Throws:
        PlanItException - thrown if error
      • isModeAllowed

        boolean isModeAllowed​(Zone accessZone,
                              Mode mode)
                       throws PlanItException
        Verify if a mode is allowed access to the zone via this connectoid
        Parameters:
        accessZone - to verify
        mode - to verify if allowed
        Returns:
        true when allowed, false otherwise
        Throws:
        PlanItException - thrown if provided zone is not valid