// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.repository;
/**
* ggu class global comment. Detailled comment
*/
public class SortedComponentSetting {
private String id, name, pattern, description;
private int level;
public SortedComponentSetting() {
super();
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPattern() {
return pattern;
}
public void setPattern(String pattern) {
this.pattern = pattern;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
@Override
public int hashCode() {
return 17 * this.getPattern().hashCode() * this.getLevel();
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof SortedComponentSetting)) {
return false;
}
SortedComponentSetting other = (SortedComponentSetting) obj;
return other.getPattern().equals(this.getPattern()) && other.getLevel() == this.getLevel();
}
@Override
public String toString() {
return this.getPattern();
}
}