Class OchPortMapper
- java.lang.Object
-
- org.onosproject.net.optical.device.port.AbstractPortMapper<OchPort>
-
- org.onosproject.net.optical.device.port.OchPortMapper
-
- All Implemented Interfaces:
PortMapper<OchPort>
@Beta public class OchPortMapper extends AbstractPortMapper<OchPort>
PortMapperto handlerOchPorttranslation.
-
-
Constructor Summary
Constructors Constructor Description OchPortMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<OchPort>as(org.onosproject.net.Port port)Returnsportmapped to<P>.booleanis(org.onosproject.net.Port port)Returns true if this port is capable of being projected as<P>.protected java.util.Optional<OchPort>mapPort(org.onosproject.net.Port port)Returnsportmapped to<P>.
-
-
-
Method Detail
-
is
public boolean is(org.onosproject.net.Port port)
Description copied from class:AbstractPortMapperReturns 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:
isin interfacePortMapper<OchPort>- Overrides:
isin classAbstractPortMapper<OchPort>- Parameters:
port- port- Returns:
- true if this port can be projected as the given type
-
as
public java.util.Optional<OchPort> as(org.onosproject.net.Port port)
Description copied from class:AbstractPortMapperReturnsportmapped to<P>.Note: Subclasses should override and check if
portis already of typePand directly returnOptional.of((P) port), if not callsuper.as(port).- Specified by:
asin interfacePortMapper<OchPort>- Overrides:
asin classAbstractPortMapper<OchPort>- Parameters:
port- Port to map- Returns:
portmapped to<P>
-
mapPort
protected java.util.Optional<OchPort> mapPort(org.onosproject.net.Port port)
Description copied from class:AbstractPortMapperReturnsportmapped to<P>.- Specified by:
mapPortin classAbstractPortMapper<OchPort>- Parameters:
port- Port to map- Returns:
portmapped to<P>
-
-