ehcache

net.sf.ehcache.config.generator.model
Interface NodeAttribute

All Known Implementing Classes:
SimpleNodeAttribute

public interface NodeAttribute

Interface that abstracts the idea of an attribute. An attribute has a name, a value, boolean indicating if its an optional attribute and a default value

Author:
Abhishek Sanoujam

Method Summary
 NodeAttribute defaultValue(String defaultValue)
          Builder convenience method for setting defaultValue
 String getDefaultValue()
          Returns the default value of the attribute
 String getName()
          Name of the attribute
 String getValue()
          Value of the attribute
 boolean isOptional()
          Returns true if the attribute is optional, otherwise false
 NodeAttribute optional(boolean optional)
          Builder convenience method for setting optional
 void setDefaultValue(String defaultValue)
          Default value setter
 void setOptional(boolean optional)
          Sets this attribute to optional or not
 void setValue(String value)
          Setter for value
 

Method Detail

getName

String getName()
Name of the attribute

Returns:
Name of the attribute

getValue

String getValue()
Value of the attribute

Returns:
value of the attribute

isOptional

boolean isOptional()
Returns true if the attribute is optional, otherwise false

Returns:
Returns true if the attribute is optional, otherwise false

getDefaultValue

String getDefaultValue()
Returns the default value of the attribute

Returns:
default value of the attribute

setOptional

void setOptional(boolean optional)
Sets this attribute to optional or not

Parameters:
optional - true if this attribute is optional

setDefaultValue

void setDefaultValue(String defaultValue)
Default value setter

Parameters:
defaultValue - the default value

setValue

void setValue(String value)
Setter for value

Parameters:
value - the new value

optional

NodeAttribute optional(boolean optional)
Builder convenience method for setting optional

Parameters:
optional - true if optional
Returns:
the same attribute instance

defaultValue

NodeAttribute defaultValue(String defaultValue)
Builder convenience method for setting defaultValue

Parameters:
defaultValue - the default value
Returns:
the same attribute instance

ehcache

Copyright 2001-2014, Terracotta, Inc.