Class OtuPortMapper

    • Constructor Detail

      • OtuPortMapper

        public OtuPortMapper()
    • Method Detail

      • is

        public boolean is​(org.onosproject.net.Port port)
        Description copied from class: AbstractPortMapper
        Returns true if this port is capable of being projected as <P>.

        Note: Subclasses should override and implement short-cut conditions and call super.is(port).

        Specified by:
        is in interface PortMapper<OtuPort>
        Overrides:
        is in class AbstractPortMapper<OtuPort>
        Parameters:
        port - port
        Returns:
        true if this port can be projected as the given type
      • as

        public Optional<OtuPort> as​(org.onosproject.net.Port port)
        Description copied from class: AbstractPortMapper
        Returns port mapped to <P>.

        Note: Subclasses should override and check if port is already of type P and directly return Optional.of((P) port), if not call super.as(port).

        Specified by:
        as in interface PortMapper<OtuPort>
        Overrides:
        as in class AbstractPortMapper<OtuPort>
        Parameters:
        port - Port to map
        Returns:
        port mapped to <P>