public Collection<?> getSelectedValues() { Object o = getValue(); if (o == null) return new LinkedList<Object>(); // this should not happen ... if (o instanceof Collection) return (Collection<?>)o; LinkedList<Object> out = new LinkedList<Object>(); if (o instanceof Object[]) { MCollection.copyArray((Object[])o, out); } else out.add(o); return out; }