Top Description Methods
net.sf.ehcache.config.generator.model

public Interface NodeAttribute

Known Direct Implementers
net.sf.ehcache.config.generator.model.SimpleNodeAttribute

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

Modifier and TypeMethod and Description
public NodeAttribute

Returns:

the same attribute instance
defaultValue
(String
the default value
defaultValue
)

Builder convenience method for setting defaultValue

public String

Returns:

default value of the attribute
getDefaultValue
()

Returns the default value of the attribute

public String

Returns:

Name of the attribute
getName
()

Name of the attribute

public String

Returns:

value of the attribute
getValue
()

Value of the attribute

public boolean

Returns:

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

Returns true if the attribute is optional, otherwise false

public NodeAttribute

Returns:

the same attribute instance
optional
(boolean
true if optional
optional
)

Builder convenience method for setting optional

public void
setDefaultValue(String
the default value
defaultValue
)

Default value setter

public void
setOptional(boolean
true if this attribute is optional
optional
)

Sets this attribute to optional or not

public void
setValue(String
the new value
value
)

Setter for value

Method Detail

defaultValueback to summary
public NodeAttribute defaultValue(String defaultValue)

Builder convenience method for setting defaultValue

Parameters
defaultValue:String

the default value

Returns:NodeAttribute

the same attribute instance

getDefaultValueback to summary
public String getDefaultValue()

Returns the default value of the attribute

Returns:String

default value of the attribute

getNameback to summary
public String getName()

Name of the attribute

Returns:String

Name of the attribute

getValueback to summary
public String getValue()

Value of the attribute

Returns:String

value of the attribute

isOptionalback to summary
public boolean isOptional()

Returns true if the attribute is optional, otherwise false

Returns:boolean

Returns true if the attribute is optional, otherwise false

optionalback to summary
public NodeAttribute optional(boolean optional)

Builder convenience method for setting optional

Parameters
optional:boolean

true if optional

Returns:NodeAttribute

the same attribute instance

setDefaultValueback to summary
public void setDefaultValue(String defaultValue)

Default value setter

Parameters
defaultValue:String

the default value

setOptionalback to summary
public void setOptional(boolean optional)

Sets this attribute to optional or not

Parameters
optional:boolean

true if this attribute is optional

setValueback to summary
public void setValue(String value)

Setter for value

Parameters
value:String

the new value