protected static <T>void addItems(Collection<T> collection,T[] elements){
  if (elements != null) {
    for (    T element : elements) {
      collection.add(element);
    }
  }
}

protected static < T > void addItems ( Collection < T > collection , T [ ] elements ) { if ( elements != null ) { for ( T element : elements ) { collection . add ( element ) ; } } }
adds the items to a collection ( null - safe ) .
