public static <T>LinkedHashSet<T> asOrderedSet(T... values){
  if (values == null) {
    return new LinkedHashSet<T>(0);
  }
 else {
    return new LinkedHashSet<T>(Arrays.asList(values));
  }
}

public static < T > LinkedHashSet < T > asOrderedSet ( T ... values ) { if ( values == null ) { return new LinkedHashSet < T > ( 0 ) ; } else { return new LinkedHashSet < T > ( Arrays . asList ( values ) ) ; } }
collects the passed in objects to a linkedhashset .
