@Beta public class OchPortMapper extends AbstractPortMapper<OchPort>
PortMapper to handler OchPort translation.| Constructor and Description |
|---|
OchPortMapper() |
| Modifier and Type | Method and Description |
|---|---|
Optional<OchPort> |
as(org.onosproject.net.Port port)
Returns
port mapped to {@code |
boolean |
is(org.onosproject.net.Port port)
Returns true if this port is capable of being projected as {@code
|
protected Optional<OchPort> |
mapPort(org.onosproject.net.Port port)
Returns
port mapped to {@code |
public boolean is(org.onosproject.net.Port port)
AbstractPortMapper<P>.
Note: Subclasses should override and implement short-cut conditions
and call super.is(port).
is in interface PortMapper<OchPort>is in class AbstractPortMapper<OchPort>port - portpublic Optional<OchPort> as(org.onosproject.net.Port port)
AbstractPortMapperport 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).
as in interface PortMapper<OchPort>as in class AbstractPortMapper<OchPort>port - Port to mapport mapped to <P>protected Optional<OchPort> mapPort(org.onosproject.net.Port port)
AbstractPortMapperport mapped to <P>.mapPort in class AbstractPortMapper<OchPort>port - Port to mapport mapped to <P>