blob: c677771d10e716f728e6786fc72736d49e67f904 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2017 IBM Corporation and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.dltk.debug.ui.preferences;
/**
* Model object that represents a single entry in a filter table.
*/
public class Filter {
private String fName;
private boolean fChecked;
// Element modifiers, used for correct icon display.
int modifiers;
public Filter(String name, boolean checked, int modifiers) {
setName(name);
setChecked(checked);
setModifiers(modifiers);
}
public int getModifiers() {
return modifiers;
}
public void setModifiers(int modifiers) {
this.modifiers = modifiers;
}
public String getName() {
return fName;
}
public void setName(String name) {
fName = name;
}
public boolean isChecked() {
return fChecked;
}
public void setChecked(boolean checked) {
fChecked = checked;
}
@Override
public boolean equals(Object o) {
if (o instanceof Filter) {
Filter other = (Filter) o;
if (getName().equals(other.getName())) {
return true;
}
}
return false;
}
@Override
public int hashCode() {
return getName().hashCode();
}
}