@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!org.onos.yang.gen.v1.urn.onos.core.device.service.rev151001.GetDeviceInput.class.equals( ((DataObject) obj).getImplementedInterface())) { return false; } org.onos.yang.gen.v1.urn.onos.core.device.service.rev151001.GetDeviceInput other = (org.onos.yang.gen.v1.urn.onos.core.device.service.rev151001.GetDeviceInput) obj; if (_deviceId == null) { if (other.getDeviceId() != null) { return false; } } else if (!_deviceId.equals(other.getDeviceId())) { return false; } if (getClass() == obj.getClass()) { // Simple case: we are comparing against self GetDeviceInputImpl otherImpl = (GetDeviceInputImpl) obj; if (augmentation == null) { if (otherImpl.augmentation != null) { return false; } } else if (!augmentation.equals(otherImpl.augmentation)) { return false; } } else { // Hard case: compare our augments with presence there... for (Map.Entry< java.lang.Class< ? extends Augmentation< org.onos.yang.gen.v1.urn.onos.core.device.service.rev151001 .GetDeviceInput>>, Augmentation< org.onos.yang.gen.v1.urn.onos.core.device.service.rev151001.GetDeviceInput>> e : augmentation.entrySet()) { if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false; } } // .. and give the other one the chance to do the same if (!obj.equals(this)) { return false; } } return true; }
@Override public int hashCode() { if (hashValid) { return hash; } final int prime = 31; int result = 1; result = prime * result + ((_deviceId == null) ? 0 : _deviceId.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); hash = result; hashValid = true; return result; }