@Override public <F extends OFValueType<F>> F get(MatchField<F> field) throws UnsupportedOperationException { if (!supports(field)) throw new UnsupportedOperationException( "OFMatchV3Ver14 does not support matching on field " + field.getName()); OFOxm<F> oxm = this.oxmList.get(field); if (oxm == null || !field.arePrerequisitesOK(this)) return null; return oxm.getValue(); }
@Override public <F extends OFValueType<F>> Masked<F> getMasked(MatchField<F> field) throws UnsupportedOperationException { if (!supportsMasked(field)) throw new UnsupportedOperationException( "OFMatchV3Ver14 does not support masked matching on field " + field.getName()); OFOxm<F> oxm = this.oxmList.get(field); if (oxm == null || !field.arePrerequisitesOK(this)) return null; if (oxm.getMask() == null) return null; // TODO: Make OfOxm extend Masked and just return the OXM? return Masked.of(oxm.getValue(), oxm.getMask()); }