code: @SuppressWarnings("rawtypes")
      public static Collection createConcreteCollection(Class interfaceType) {
          Collection elements;
          if (interfaceType.equals(List.class) || interfaceType.equals(Collection.class)) {
              elements = new ArrayList();
          }
          else if (interfaceType.equals(SortedSet.class)) {
              elements = new TreeSet();
          }
          else {
              elements = new HashSet();
          }
          return elements;
      }
docs: Creates a concrete collection for the suppied interface
  @param interfaceType The interface
  @return ArrayList for List, TreeSet for SortedSet, HashSet for Set etc.