/** * Converts a given cell to a String; no alignment considered. */ protected String form(ObjectMatrix1D matrix, int index, Former formatter) { Object value = matrix.get(index); if (value==null) return ""; return String.valueOf(value); } /**
/** * Converts a given cell to a String; no alignment considered. */ protected String form(ObjectMatrix1D matrix, int index, Former formatter) { Object value = matrix.get(index); if (value==null) return ""; return String.valueOf(value); } /**
/** * Constructs a list from the given matrix. * The values are copied. So subsequent changes in <tt>values</tt> are not reflected in the list, and vice-versa. * * @param values The values to be filled into the new list. * @return a new list. */ public cern.colt.list.ObjectArrayList toList(ObjectMatrix1D values) { int size = values.size(); cern.colt.list.ObjectArrayList list = new cern.colt.list.ObjectArrayList(size); list.setSize(size); for (int i=size; --i >= 0; ) list.set(i, values.get(i)); return list; } }
/** * Constructs a list from the given matrix. * The values are copied. So subsequent changes in <tt>values</tt> are not reflected in the list, and vice-versa. * * @param values The values to be filled into the new list. * @return a new list. */ public cern.colt.list.ObjectArrayList toList(ObjectMatrix1D values) { int size = values.size(); cern.colt.list.ObjectArrayList list = new cern.colt.list.ObjectArrayList(size); list.setSize(size); for (int i=size; --i >= 0; ) list.set(i, values.get(i)); return list; } }