src/main/java/com/machinezoo/pushmode/dom/DomAttributes.java
default DomElement clazz(String... classes) {
		if (classes != null && classes.length > 0) {
			StringBuilder builder = new StringBuilder();
			boolean first = true;
			for (String clazz : classes) {
				if (clazz != null && !clazz.isEmpty()) {
					if (first)
						first = false;
					else
						builder.append(" ");
					builder.append(clazz);
				}
			}
			if (!first)
				return set("class", builder.toString());
			else
				return unset("class");
		} else
			return unset("class");
	}
/**
	 * Sets {@code class} attribute to an array of values.
	 * Array items are joined with spaces and the attribute is set to the resulting string.
	 * If {@code classes} is {@code null} or empty, the attribute is removed.
	 * 
	 * @param classes
	 *            list of classes
	 * @return {@code this}
	 * @throws IllegalStateException
	 *             if the element is frozen
	 */
Sets  class attribute to an array of values.
Array items are joined with spaces and the attribute is set to the resulting string.
If  classes is  null or empty, the attribute is removed.

@param classes
list of classes
@return  this
@throws IllegalStateException
if the element is frozen
Sets class attribute to an array of values . Array items are joined with spaces and the attribute is set to the resulting string . If classes is null or empty the attribute is removed . @param classes list of classes @return this @throws IllegalStateException if the element is frozen
default DomElement clazz(String... classes) {
		if (classes != null && classes.length > 0) {
			StringBuilder builder = new StringBuilder();
			boolean first = true;
			for (String clazz : classes) {
				if (clazz != null && !clazz.isEmpty()) {
					if (first)
						first = false;
					else
						builder.append(" ");
					builder.append(clazz);
				}
			}
			if (!first)
				return set("class", builder.toString());
			else
				return unset("class");
		} else
			return unset("class");
	}
default DomElement clazz ( String ... classes ) { if ( classes != null && classes . length > 0 ) { StringBuilder builder = new StringBuilder ( ) ; boolean first = true ; for ( String clazz : classes ) { if ( clazz != null && ! clazz . isEmpty ( ) ) { if ( first ) first = false ; else builder . append ( " " ) ; builder . append ( clazz ) ; } } if ( ! first ) return set ( "class" , builder . toString ( ) ) ; else return unset ( "class" ) ; } else return unset ( "class" ) ; }
Sets {@code class} attribute to an array of values.
Sets { @code class } attribute to an array of values .