| /** |
| * Copyright (c) 2018 CEA. |
| * 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 |
| * |
| * Contributors: |
| * CEA - initial API and implementation and/or initial documentation |
| */ |
| package org.eclipse.sensinact.studio.http.messages.snamessage; |
| |
| /** |
| * @author Etienne Gandrille |
| */ |
| public class ObjectFilter { |
| |
| private String type; |
| private String definition; |
| |
| public String getType() { |
| return type; |
| } |
| |
| public void setType(String type) { |
| this.type = type; |
| } |
| |
| public String getDefinition() { |
| return definition; |
| } |
| |
| public void setDefinition(String definition) { |
| this.definition = definition; |
| } |
| |
| @Override |
| public int hashCode() { |
| final int prime = 31; |
| int result = 1; |
| result = prime * result + ((type == null) ? 0 : type.hashCode()); |
| result = prime * result + ((definition == null) ? 0 : definition.hashCode()); |
| return result; |
| } |
| |
| @Override |
| public boolean equals(Object obj) { |
| if (this == obj) |
| return true; |
| if (obj == null) |
| return false; |
| if (getClass() != obj.getClass()) |
| return false; |
| ObjectFilter other = (ObjectFilter) obj; |
| if (type == null) { |
| if (other.type != null) |
| return false; |
| } else if (!type.equals(other.type)) |
| return false; |
| if (definition == null) { |
| if (other.definition != null) |
| return false; |
| } else if (!definition.equals(other.definition)) |
| return false; |
| return true; |
| } |
| |
| @Override |
| public String toString() { |
| return "ObjectFilter [definition=" + definition + ", type=" + type + "]"; |
| } |
| } |