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

org.serversass.ast.Attribute Maven / Gradle / Ivy

There is a newer version: 5.0.1
Show newest version
/*
 * Made with all the love in the world
 * by scireum in Remshalden, Germany
 *
 * Copyright by scireum GmbH
 * http://www.scireum.de - [email protected]
 */

package org.serversass.ast;

/**
 * Represents an attribute within a section like:
 * 
 * {@code
 *    font-size: 15px;
 * }
 * 
*/ public class Attribute { private String name; private Expression expression; /** * Creates a new attribute with the given name * * @param name the name of the attribute without ":" at the end */ public Attribute(String name) { this.name = name; } /** * Sets the expression representing the value of the attribute * * @param expression the new value of the attribute */ public void setExpression(Expression expression) { this.expression = expression; } /** * Returns the expression representing the value of the attribute * * @return the value of the attribute as expression */ public Expression getExpression() { return expression; } @Override public String toString() { return name + ": " + expression + ";"; } /** * Returns the name of the attribute without the trailing ":" * * @return the name of the attribute */ public String getName() { return name; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy