public static <T> boolean isSubList(List<T> l1, List<? super T> l) {
    Iterator<? super T> it = l.iterator();
    Iterator<T> it1 = l1.iterator();
    while(it1.hasNext()) {
      Object o1 = it1.next();
      if(! it.hasNext())
        return false;
      Object o = it.next();
      while((o == null && ! (o1 == null)) || (o != null && !o.equals(o1))) {
        if(! it.hasNext())
          return false;
        o = it.next();
      }
    }
    return true;
  }