1 package org.simantics.history.csv;
4 public enum DecimalSeparator {
5 DOT("Dot (.)","."),COMMA("Comma (,)",",");
7 public String preference;
8 DecimalSeparator(String label, String preference) {
10 this.preference = preference;
12 public static DecimalSeparator fromIndex(int index) {
13 return values()[index];
15 public String toPreference() {
18 public static DecimalSeparator fromPreference(String preference) {
19 for(DecimalSeparator s : values()) {
20 if(s.preference.equals(preference)) return s;
24 public static DecimalSeparator fromChar(char c) {
25 String preference = "" + c;
26 for(DecimalSeparator s : values()) {
27 if(s.preference.equals(preference)) return s;