ONOS-2740,ONOS-2741,from ONOS-3032 - to ONOS 3071 , OSPF Protocol Implementation

Change-Id: Ie8cccca4aaf2641ab1e332ed367ddfc9b725a35c
diff --git a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImpl.java b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImpl.java
new file mode 100755
index 0000000..a5c99b2
--- /dev/null
+++ b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImpl.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.ospf.controller.area;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Objects;
+import org.onlab.packet.Ip4Address;
+import org.onosproject.ospf.controller.OspfAreaAddressRange;
+
+/**
+ * Representation of an area address ranges.
+ * Address ranges are used in order to aggregate routing information at area boundaries.
+ * Each address range is specified by an [address,mask] pair and a status indication of
+ * either advertise or do not advertise
+ */
+public class OspfAreaAddressRangeImpl implements OspfAreaAddressRange {
+
+    public Ip4Address ipAddress;
+    public String mask;
+    public boolean advertise;
+
+    /**
+     * Gets the IP address.
+     *
+     * @return IP address
+     */
+    public Ip4Address ipAddress() {
+        return ipAddress;
+    }
+
+    /**
+     * Sets the IP address.
+     *
+     * @param ipAddress IP address
+     */
+    public void setIpAddress(Ip4Address ipAddress) {
+        this.ipAddress = ipAddress;
+    }
+
+    /**
+     * Gets the network mask.
+     *
+     * @return network  mask
+     */
+    public String mask() {
+        return mask;
+    }
+
+    /**
+     * Sets the network mask.
+     *
+     * @param mask network mask value
+     */
+    public void setMask(String mask) {
+        this.mask = mask;
+    }
+
+    /**
+     * Gets the advertise value.
+     *
+     * @return advertise value
+     */
+    public boolean isAdvertise() {
+        return advertise;
+    }
+
+    /**
+     * Sets the advertise value.
+     *
+     * @param advertise advertise value
+     */
+    public void setAdvertise(boolean advertise) {
+        this.advertise = advertise;
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (!(other instanceof OspfAreaAddressRangeImpl)) {
+            return false;
+        }
+        OspfAreaAddressRangeImpl otherAreaAddressRange = (OspfAreaAddressRangeImpl) other;
+        return Objects.equal(ipAddress, otherAreaAddressRange.ipAddress) &&
+                Objects.equal(mask, otherAreaAddressRange.mask) &&
+                Objects.equal(advertise, otherAreaAddressRange.advertise);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(ipAddress, mask, advertise);
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(getClass())
+                .omitNullValues()
+                .add("ipAddress", ipAddress)
+                .add("mask", mask)
+                .add("advertise", advertise)
+                .toString();
+    }
+}
\ No newline at end of file