-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.diagram.symbollibrary.ui;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-class GroupFilter implements Comparable<GroupFilter> {\r
- private String name;\r
- private String filterText;\r
- private boolean active;\r
-\r
- public GroupFilter(String name, String filterText, boolean active) {\r
- assert name != null;\r
- assert filterText != null;\r
- this.name = name;\r
- this.filterText = filterText;\r
- this.active = active;\r
- }\r
-\r
- public String getName() {\r
- return name;\r
- }\r
-\r
- public void setName(String name) {\r
- this.name = name;\r
- }\r
-\r
- public String getFilterText() {\r
- return filterText;\r
- }\r
-\r
- public void setFilterText(String filterText) {\r
- this.filterText = filterText;\r
- }\r
-\r
- public boolean isActive() {\r
- return active;\r
- }\r
-\r
- public void setActive(boolean active) {\r
- this.active = active;\r
- }\r
-\r
- @Override\r
- public String toString() {\r
- return getClass().getSimpleName() + "[" + name + ", filter=" + filterText + ", active=" + active + "]";\r
- }\r
-\r
- @Override\r
- public int hashCode() {\r
- final int prime = 31;\r
- int result = 1;\r
- result = prime * result + filterText.hashCode();\r
- result = prime * result + name.hashCode();\r
- return result;\r
- }\r
-\r
- @Override\r
- public boolean equals(Object obj) {\r
- if (this == obj)\r
- return true;\r
- if (obj == null)\r
- return false;\r
- if (!(obj instanceof GroupFilter))\r
- return false;\r
- GroupFilter other = (GroupFilter) obj;\r
- if (!filterText.equals(other.filterText))\r
- return false;\r
- if (!name.equals(other.name))\r
- return false;\r
- return true;\r
- }\r
-\r
- @Override\r
- public int compareTo(GroupFilter o) {\r
- return name.compareToIgnoreCase(o.name);\r
- }\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * 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:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.diagram.symbollibrary.ui;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+class GroupFilter implements Comparable<GroupFilter> {
+ private String name;
+ private String filterText;
+ private boolean active;
+
+ public GroupFilter(String name, String filterText, boolean active) {
+ assert name != null;
+ assert filterText != null;
+ this.name = name;
+ this.filterText = filterText;
+ this.active = active;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getFilterText() {
+ return filterText;
+ }
+
+ public void setFilterText(String filterText) {
+ this.filterText = filterText;
+ }
+
+ public boolean isActive() {
+ return active;
+ }
+
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+
+ @Override
+ public String toString() {
+ return getClass().getSimpleName() + "[" + name + ", filter=" + filterText + ", active=" + active + "]";
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + filterText.hashCode();
+ result = prime * result + name.hashCode();
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof GroupFilter))
+ return false;
+ GroupFilter other = (GroupFilter) obj;
+ if (!filterText.equals(other.filterText))
+ return false;
+ if (!name.equals(other.name))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int compareTo(GroupFilter o) {
+ return name.compareToIgnoreCase(o.name);
+ }
}
\ No newline at end of file