@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Tuple)) return false; Tuple that = (Tuple) o; int size = size(); if (size != that.size()) return false; for (int i = 0; i < size; i++) { if (!DefaultTypeTransformation.compareEqual(get(i), that.get(i))) { return false; } } return true; }
public List<Object> getUpdatedParams(List<Object> params, List<Tuple> indexPropList) { List<Object> updatedParams = new ArrayList<Object>(); for (Tuple tuple : indexPropList) { int index = (Integer) tuple.get(0); String prop = (String) tuple.get(1); if (index < 0 || index >= params.size()) throw new IllegalArgumentException("Invalid index " + index + " should be in range 1.." + params.size()); updatedParams.add(prop.equals("<this>") ? params.get(index) : InvokerHelper.getProperty(params.get(index), prop)); } return updatedParams; }
public List<Object> getUpdatedParams(List<Object> params, List<Tuple> indexPropList) { List<Object> updatedParams = new ArrayList<Object>(); for (Tuple tuple : indexPropList) { int index = (Integer) tuple.get(0); String prop = (String) tuple.get(1); if (index < 0 || index >= params.size()) throw new IllegalArgumentException("Invalid index " + index + " should be in range 1.." + params.size()); try { updatedParams.add(prop.equals("<this>") ? params.get(index) : InvokerHelper.getProperty(params.get(index), prop)); } catch(MissingPropertyException mpe) { throw new IllegalArgumentException("Property '" + prop + "' not found for parameter " + index); } } return updatedParams; }