@Test public void testGetSupportedParameterValues() { List<SupportedParameterValues> supportedParameterValues = ethTypeCl.getSupportedParameterValues(); Assert.assertEquals(1, supportedParameterValues.size()); Assert.assertEquals(ClassifierTestUtils.SUPPORTED_PARAM_NAME_ETH, supportedParameterValues.get(0).getParameterName().getValue()); Assert.assertEquals(EtherTypeClassifierDefinition.DEFINITION, ethTypeCl.getClassifierDefinition()); Assert.assertEquals(EtherTypeClassifierDefinition.ID, ethTypeCl.getId()); Assert.assertNull(ethTypeCl.getParent()); }
@Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv4_VALUE).build(), new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv6_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(EtherTypeClassifierDefinition.ETHERTYPE_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); }
EtherTypeClassifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv4_VALUE).build(), new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv6_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(EtherTypeClassifierDefinition.ETHERTYPE_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); } }
EtherTypeClassifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv4_VALUE).build(), new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv6_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(EtherTypeClassifierDefinition.ETHERTYPE_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); } EtherTypeClassifier(Classifier parent); }
EtherTypeClassifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv4_VALUE).build(), new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv6_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(EtherTypeClassifierDefinition.ETHERTYPE_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); } EtherTypeClassifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues(); }
EtherTypeClassifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv4_VALUE).build(), new SupportedIntValueBuilder().setValue(EtherTypeClassifierDefinition.IPv6_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(EtherTypeClassifierDefinition.ETHERTYPE_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); } EtherTypeClassifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues();  }