ar.com.epere4.java2excel.parser.impl
Class PropertyDtdStaticImpl
java.lang.Object
ar.com.epere4.java2excel.parser.impl.AbstractPropertyDtd
ar.com.epere4.java2excel.parser.impl.PropertyDtdStaticImpl
- All Implemented Interfaces:
- PropertyDtd
public class PropertyDtdStaticImpl
- extends AbstractPropertyDtd
Implementation of PropertyDtd
that
returns a constant value with
evaluateExpression(Object)
.
Instances of this class are intended to be used to display values that
has to be all the same but are not present as a property in the collection.
Objects like this must be added manualy by you using the method
BodyDtd.addProperty(PropertyDtd)
.
The result of using this is a column with all values equals to each other.
This may seem useless (Hey, what's the point of having a constant column??),
but some people find useful to copy data from different generated Excel files
and join them in a single file. Different files may have different values in
these constant columns, so they can use autofilters with them.
- Since:
- 09/03/2006
- Author:
- epere4
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PropertyDtdStaticImpl
public PropertyDtdStaticImpl()
- Default constructor.
- Since:
- 09/03/2006
PropertyDtdStaticImpl
public PropertyDtdStaticImpl(java.lang.String expression,
java.lang.Object value)
- Parameters:
expression
- default value for
getExpression()
. Cannot be null, because it is used as a key.value
- default value for getValue()
.- Since:
- 09/03/2006
PropertyDtdStaticImpl
public PropertyDtdStaticImpl(java.lang.String expression,
java.lang.String title,
java.lang.Object value)
- Parameters:
expression
- default value for
getExpression()
. Cannot be null, because it is used as a key.title
- default value for
getTitle()
.value
- default value for getValue()
.- Since:
- 09/03/2006
getValue
public java.lang.Object getValue()
- Returns:
- Returns the value.
- Since:
- 09/03/2006
setValue
public void setValue(java.lang.Object value)
- Parameters:
value
- The value to set.- Since:
- 09/03/2006
evaluateExpression
public java.lang.Object evaluateExpression(java.lang.Object element)
throws ognl.OgnlException
- Evaluates the
ognl expression
against the suplied element.
This implementation just returs getValue()
.
- Parameters:
element
- the element which is going to be target for the
ognl expression.
- Returns:
- the result of the evaluation
- Throws:
ognl.OgnlException
- if the is an exception while evaluating ognl.- Since:
- 09/03/2006
- See Also:
evaluateExpression(java.lang.Object)
Copyright © 2006 epere4. All Rights Reserved.