public java.util.LinkedList<PropertyDescriptor> getProperties() { assert _editable; if (isEditing()) { getCellEditor().stopCellEditing(); } @SuppressWarnings("unchecked") java.util.Vector<java.util.Vector<String>> vector = _model.getDataVector(); java.util.LinkedList<PropertyDescriptor> result = new java.util.LinkedList<PropertyDescriptor>(_hiddenProperties); for (java.util.Vector<String> row : vector) { // // Eliminate rows with null or empty keys // String key = row.elementAt(0); if (key != null) { key = key.trim(); if (!key.equals("")) { String val = row.elementAt(1); if (val == null) { val = ""; } result.add(new PropertyDescriptor(key, val)); } } } return result; }
static java.util.LinkedList<String[]> parameterValuesToAttributes( java.util.Map<String, String> parameterValues, java.util.List<String> parameters) { java.util.LinkedList<String[]> result = new java.util.LinkedList<String[]>(); // // We use a LinkedHashSet to maintain order while eliminating duplicates // for (String p : new java.util.LinkedHashSet<String>(parameters)) { String val = parameterValues.get(p); if (val != null) { result.add(createAttribute(p, val)); } } return result; }