code: public static <T> boolean isTrivial(Collection<T> coll) {
  		if (coll == null)
  			throw new NullPointerException();
  		if (coll.isEmpty() || coll.size() == 1)
  			return true;
  		Iterator<T> iterator = coll.iterator();
  		T firstElement = iterator.next();
  		while (iterator.hasNext()) {
  			if (!firstElement.equals(iterator.next()))
  				return false;
  		}
  		return true;
  	}
docs: Checks if the given list is trivial.<br>
  A list is considered trivial if all its elements are equal (according to
  T.equals()).
  
  @param <T>
  List type.
  @param coll
  Basic list for operation.
  @return <code>true</code> if this list is trivial;<br>
  <code>false</code> otherwise.