blob: b4817c8f6113a95929e21aa4c6dd8279751694e0 [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2012, 2020 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.internal.r.ui.datafilter;
import org.eclipse.statet.jcommons.collections.ImCollections;
import org.eclipse.statet.jcommons.collections.ImList;
public class FilterType {
public static final FilterType LEVEL= new FilterType(0, Messages.LevelFilter_label);
public static final FilterType INTERVAL= new FilterType(1, Messages.IntervalFilter_label);
public static final FilterType TEXT= new FilterType(2, Messages.TextFilter_label);
public static final ImList<FilterType> TYPES= ImCollections.newList(LEVEL, INTERVAL, TEXT);
private final int id;
private final String label;
public FilterType(final int id, final String label) {
this.id= id;
this.label= label;
}
public int getId() {
return this.id;
}
public String getLabel() {
return this.label;
}
@Override
public String toString() {
return this.id + ": " + this.label.substring(1); //$NON-NLS-1$
}
}