@Override
	public int compareTo(Object o) {
		if (this == o) return 0;
		if (!(o instanceof Mode)) return getClass().getName().compareTo(o.getClass().getName());

		Mode m = (Mode) o;
		int c = name.compareTo(m.name);
		if (c != 0) return c;
		if ("".equals(name)) return 0;
		if (isNegation != m.isNegation()) return (isNegation) ? Integer.MAX_VALUE : Integer.MIN_VALUE;
		return 0;
	}