Interface Ports<E extends Port>

    • Method Detail

      • getPort

        E getPort​(String name)
        Get a port.
        Parameters:
        name - name of the port to get
        Returns:
        the port if exists or null
      • contains

        boolean contains​(String name)
        Test if a port exists.
        Parameters:
        name - name of the port to test
        Returns:
        true if the port exists
      • contains

        boolean contains​(E port)
        Test if a port exists by testing if port name exists.
        Parameters:
        port - port to test
        Returns:
        true if the port exists
      • getPortNames

        Set<String> getPortNames()
        Get the names of the ports
        Returns:
        a set with the names of the ports
      • size

        int size()
        Get the number of ports in the object.
        Returns:
        the number of ports
      • isEmpty

        boolean isEmpty()
        Test if the object is empty
        Returns:
        true if the object is null
      • countDataFormat

        int countDataFormat​(DataFormat format)
        Count the number of occurrences of a format in the port.
        Parameters:
        format - the format to test
        Returns:
        the number of occurrences of the format
      • getPortsWithDataFormat

        List<E> getPortsWithDataFormat​(DataFormat format)
        Get a list with all the ports that format is the specified format.
        Parameters:
        format - the format to get
        Returns:
        always a list (even empty) of Ports
      • getFirstPort

        E getFirstPort()
        Get the first port.
        Returns:
        a port or null if the object does not contains ports.