/** * Returns a transformed list backed by the given list. * <p> * Each object is passed through the transformer as it is added to the * List. It is important not to use the original list after invoking this * method, as it is a backdoor for adding untransformed objects. * * @param list the list to predicate, must not be null * @param transformer the transformer for the list, must not be null * @return a transformed list backed by the given list * @throws IllegalArgumentException if the List or Transformer is null */ public static List transformedList(List list, Transformer transformer) { return TransformedList.decorate(list, transformer); }
/** * Returns a transformed list backed by the given list. * <p> * Each object is passed through the transformer as it is added to the * List. It is important not to use the original list after invoking this * method, as it is a backdoor for adding untransformed objects. * * @param list the list to predicate, must not be null * @param transformer the transformer for the list, must not be null * @return a transformed list backed by the given list * @throws IllegalArgumentException if the List or Transformer is null */ public static List transformedList(List list, Transformer transformer) { return TransformedList.decorate(list, transformer); }
public List makeEmptyList() { return TransformedList.decorate(new ArrayList(), TestTransformedCollection.NOOP_TRANSFORMER); }
public List makeFullList() { List list = new ArrayList(); list.addAll(Arrays.asList(getFullElements())); return TransformedList.decorate(list, TestTransformedCollection.NOOP_TRANSFORMER); }
public void testTransformedList() { List list = TransformedList.decorate(new ArrayList(), TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER); assertEquals(0, list.size()); Object[] els = new Object[] {"1", "3", "5", "7", "2", "4", "6"};
/** * Returns a transformed list backed by the given list. * <p> * Each object is passed through the transformer as it is added to the * List. It is important not to use the original list after invoking this * method, as it is a backdoor for adding untransformed objects. * * @param list the list to predicate, must not be null * @param transformer the transformer for the list, must not be null * @return a transformed list backed by the given list * @throws IllegalArgumentException if the List or Transformer is null */ public static List transformedList(List list, Transformer transformer) { return TransformedList.decorate(list, transformer); }
/** * Returns a transformed list backed by the given list. * <p> * Each object is passed through the transformer as it is added to the * List. It is important not to use the original list after invoking this * method, as it is a backdoor for adding untransformed objects. * * @param list the list to predicate, must not be null * @param transformer the transformer for the list, must not be null * @return a transformed list backed by the given list * @throws IllegalArgumentException if the List or Transformer is null */ public static List transformedList(List list, Transformer transformer) { return TransformedList.decorate(list, transformer); }
/** * Returns a transformed list backed by the given list. * <p> * Each object is passed through the transformer as it is added to the * List. It is important not to use the original list after invoking this * method, as it is a backdoor for adding untransformed objects. * * @param list the list to predicate, must not be null * @param transformer the transformer for the list, must not be null * @return a transformed list backed by the given list * @throws IllegalArgumentException if the List or Transformer is null */ public static List transformedList(List list, Transformer transformer) { return TransformedList.decorate(list, transformer); }
/** * Returns a transformed list backed by the given list. * <p> * Each object is passed through the transformer as it is added to the * List. It is important not to use the original list after invoking this * method, as it is a backdoor for adding untransformed objects. * * @param list the list to predicate, must not be null * @param transformer the transformer for the list, must not be null * @return a transformed list backed by the given list * @throws IllegalArgumentException if the List or Transformer is null */ public static List transformedList(List list, Transformer transformer) { return TransformedList.decorate(list, transformer); }
/** * Returns a transformed list backed by the given list. * <p> * Each object is passed through the transformer as it is added to the * List. It is important not to use the original list after invoking this * method, as it is a backdoor for adding untransformed objects. * * @param list the list to predicate, must not be null * @param transformer the transformer for the list, must not be null * @return a transformed list backed by the given list * @throws IllegalArgumentException if the List or Transformer is null */ public static List transformedList(List list, Transformer transformer) { return TransformedList.decorate(list, transformer); }
/** * Returns a transformed list backed by the given list. * <p> * Each object is passed through the transformer as it is added to the * List. It is important not to use the original list after invoking this * method, as it is a backdoor for adding untransformed objects. * * @param list the list to predicate, must not be null * @param transformer the transformer for the list, must not be null * @return a transformed list backed by the given list * @throws IllegalArgumentException if the List or Transformer is null */ public static List transformedList(List list, Transformer transformer) { return TransformedList.decorate(list, transformer); }
/** * Returns a transformed list backed by the given list. * <p> * Each object is passed through the transformer as it is added to the * List. It is important not to use the original list after invoking this * method, as it is a backdoor for adding untransformed objects. * * @param list the list to predicate, must not be null * @param transformer the transformer for the list, must not be null * @return a transformed list backed by the given list * @throws IllegalArgumentException if the List or Transformer is null */ public static List transformedList(List list, Transformer transformer) { return TransformedList.decorate(list, transformer); }