1 package org.simantics.history.csv;
4 public enum ColumnSeparator {
5 COMMA("Comma (,)", ","),TAB("Tabulator (\\t)","\t"),SEMICOLON("Semicolon (;)",";"),COLON("Colon (:)",":"),SPACE("Space ( )", " ");
7 public String preference;
8 ColumnSeparator(String label, String preference) {
10 this.preference = preference;
12 public static ColumnSeparator fromIndex(int index) {
13 return values()[index];
15 public String toPreference() {
18 public static ColumnSeparator fromPreference(String preference) {
19 for(ColumnSeparator s : values()) {
20 if(s.preference.equals(preference)) return s;