X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Farphandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Farphandler%2FARPCacheEvent.java;fp=opendaylight%2Farphandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Farphandler%2FARPCacheEvent.java;h=e7b342fb7f8765a7c5c04177475b12f5835531ae;hp=0000000000000000000000000000000000000000;hb=4ca5ea31c027f33cd4c8c84adece356c354c1c3a;hpb=67a8679ab2eb3ad8d7914756e844243eac3cbd32 diff --git a/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/ARPCacheEvent.java b/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/ARPCacheEvent.java new file mode 100644 index 0000000000..e7b342fb7f --- /dev/null +++ b/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/ARPCacheEvent.java @@ -0,0 +1,62 @@ + +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.arphandler; + +public class ARPCacheEvent { + private ARPEvent event; + private boolean newReply; + + public ARPCacheEvent(ARPEvent event, boolean newReply) { + super(); + this.event = event; + this.newReply = newReply; + } + + public ARPEvent getEvent() { + return event; + } + + public boolean isNewReply() { + return newReply; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((event == null) ? 0 : event.hashCode()); + result = prime * result + (newReply ? 1231 : 1237); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ARPCacheEvent other = (ARPCacheEvent) obj; + if (event == null) { + if (other.event != null) + return false; + } else if (!event.equals(other.event)) + return false; + if (newReply != other.newReply) + return false; + return true; + } + + @Override + public String toString() { + return "ARPCacheEvent [event=" + event + ", newReply=" + newReply + "]"; + } +}