blob: 4f722f2a2e8db1e8efb56cb803b34a57d994c41c [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2010, 2021 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.ecommons.waltable.data;
public class ControlData {
public static final int ERROR= 1 << 0;
public static final int NA= 1 << 1;
public static final int ASYNC= 1 << 2;
private final int code;
private final String text;
public ControlData(final int code, final String text) {
this.code= code;
this.text= text;
}
public int getCode() {
return this.code;
}
@Override
public String toString() {
return this.text;
}
@Override
public int hashCode() {
return this.text.hashCode();
}
@Override
public boolean equals(final Object obj) {
return (obj == this
|| (obj instanceof ControlData
&& this.code == ((ControlData) obj).code ));
}
}