- switch (path) {
- case FLOWS_STATISTICS_UPDATE_MATCH:
- return new ExtensionAugment<>(NxAugMatchNodesNodeTableFlow.class,
- new NxAugMatchNodesNodeTableFlowBuilder().setNxmNxNshNp(value).build(), key);
- case FLOWS_STATISTICS_RPC_MATCH:
- return new ExtensionAugment<>(NxAugMatchRpcGetFlowStats.class,
- new NxAugMatchRpcGetFlowStatsBuilder().setNxmNxNshNp(value).build(), key);
- case PACKET_RECEIVED_MATCH:
- return new ExtensionAugment<>(NxAugMatchNotifPacketIn.class,
- new NxAugMatchNotifPacketInBuilder().setNxmNxNshNp(value).build(), key);
- case SWITCH_FLOW_REMOVED_MATCH:
- return new ExtensionAugment<>(NxAugMatchNotifSwitchFlowRemoved.class,
- new NxAugMatchNotifSwitchFlowRemovedBuilder().setNxmNxNshNp(value).build(), key);
- case PACKET_IN_MESSAGE_MATCH:
- return new ExtensionAugment<>(NxAugMatchPacketInMessage.class,
- new NxAugMatchPacketInMessageBuilder().setNxmNxNshNp(value).build(), key);
- default:
- throw new CodecPreconditionException(path);
- }
+ return switch (path) {
+ case FLOWS_STATISTICS_UPDATE_MATCH -> new ExtensionAugment<>(NxAugMatchNodesNodeTableFlow.class,
+ new NxAugMatchNodesNodeTableFlowBuilder().setNxmNxNshNp(value).build(), key);
+ case FLOWS_STATISTICS_RPC_MATCH -> new ExtensionAugment<>(NxAugMatchRpcGetFlowStats.class,
+ new NxAugMatchRpcGetFlowStatsBuilder().setNxmNxNshNp(value).build(), key);
+ case PACKET_RECEIVED_MATCH -> new ExtensionAugment<>(NxAugMatchNotifPacketIn.class,
+ new NxAugMatchNotifPacketInBuilder().setNxmNxNshNp(value).build(), key);
+ case SWITCH_FLOW_REMOVED_MATCH -> new ExtensionAugment<>(NxAugMatchNotifSwitchFlowRemoved.class,
+ new NxAugMatchNotifSwitchFlowRemovedBuilder().setNxmNxNshNp(value).build(), key);
+ case PACKET_IN_MESSAGE_MATCH -> new ExtensionAugment<>(NxAugMatchPacketInMessage.class,
+ new NxAugMatchPacketInMessageBuilder().setNxmNxNshNp(value).build(), key);
+ };