code: public static <T> boolean isSubset(Collection<T> subset, Collection<T> superset) {
          if ((superset == null) || (superset.size() == 0)) {
              return ((subset == null) || (subset.size() == 0));
          }
  
          HashSet<T> hash = new HashSet<T>(superset);
          for (T t : subset) {
              if (!hash.contains(t)) {
                  return false;
              }
          }
          return true;
      }
docs: the same.