2 * Copyright © 2017 Red Hat, Inc. and others.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.genius.mdsalutil.matches;
10 import org.opendaylight.genius.mdsalutil.NwConstants;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatch;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder;
18 public class MatchArpOp extends MatchInfoHelper<ArpMatch, ArpMatchBuilder> {
19 public static final MatchArpOp REQUEST = new MatchArpOp(NwConstants.ARP_REQUEST);
20 public static final MatchArpOp REPLY = new MatchArpOp(NwConstants.ARP_REPLY);
24 public MatchArpOp(int op) {
29 protected void applyValue(MatchBuilder matchBuilder, ArpMatch value) {
30 matchBuilder.setLayer3Match(value);
34 protected void populateBuilder(ArpMatchBuilder builder) {
43 public boolean equals(Object o) {
44 if (this == o) return true;
45 if (o == null || getClass() != o.getClass()) return false;
46 if (!super.equals(o)) return false;
48 MatchArpOp that = (MatchArpOp) o;
54 public int hashCode() {
55 int result = super.hashCode();
56 result = 31 * result + op;