All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cz.vutbr.web.css.Term Maven / Gradle / Ivy

Go to download

jStyleParser is a CSS parser written in Java. It has its own application interface that is designed to allow an efficient CSS processing in Java and mapping the values to the Java data types. It parses CSS 2.1 style sheets into structures that can be efficiently assigned to DOM elements. It is intended be the primary CSS parser for the CSSBox library. While handling errors, it is user agent conforming according to the CSS specification.

The newest version!
package cz.vutbr.web.css;

/**
 * Part of value declaration of CSS property. Can be atomic or
 * contain other Terms inside in case of TermList or TermFuncion.
 * @param  Type of value stored in term, for atomic types
 * 			 usually of type String, Float or Integer
 * 
 * @author Karel Piwko, 2008
 * @author Jan Svercl, 2008
 * 
 */
public interface Term extends Cloneable {

	/**
	 * This operator is between terms in value part of CSS declaration.
	 * Typically, indistinguishable values of are shorthanded by SLASH, alternatives are 
	 * divides by COMMA and SPACE when multi-values are used 
	 * 
	 * 

* Currently, operators are only syntactic sugar, because they are not used during * parsing values in current implementation *

* * @author kapy * */ public enum Operator { SPACE(" "), SLASH("/"), COMMA(", "); private final String value; private Operator(String value) { this.value = value; } public String value() { return value;} } /** * Getter for value * @return the value of the term */ public T getValue(); /** * Setter for value * @param value * @return Modified object to allow chaining */ public Term setValue(T value); /** * Operator between two terms. The first term is having null * @return the operator */ public Operator getOperator(); /** * Sets operator * @param operator * @return Modified object to allow chaining */ public Term setOperator(Operator operator); public Term shallowClone(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy