Package org.anchoranalysis.bean
Class NamedBean<T extends AnchorBean<?>>
- Type Parameters:
T
- item type
- All Implemented Interfaces:
NameValue<T>
public class NamedBean<T extends AnchorBean<?>>
extends NullParametersBean<NamedBean<T>>
implements NameValue<T>
A bean with an associated textual name.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItem()
The item that is to be named, the underlying bean.getName()
The name associated withitem
.getValue()
The associated value.void
The item that is to be named, the underlying bean.void
The name associated withitem
.void
Assigns the associated value.toString()
By default, we useAnchorBean.describeBean()
as the string representation of the bean.Methods inherited from class org.anchoranalysis.bean.NullParametersBean
initializeRecursive, onInitialization, onInitialization
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
NamedBean
Creates a newNamedBean
instance.- Parameters:
name
- The name associated withitem
.item
- The item that is to be named, the underlying bean.
-
NamedBean
public NamedBean()
-
-
Method Details
-
toString
Description copied from class:AnchorBean
By default, we useAnchorBean.describeBean()
as the string representation of the bean.- Overrides:
toString
in classAnchorBean<NamedBean<T extends AnchorBean<?>>>
- Returns:
- the string representation
-
getValue
Description copied from interface:NameValue
The associated value.- Specified by:
getValue
in interfaceNameValue<T extends AnchorBean<?>>
- Returns:
- the value
-
setValue
Description copied from interface:NameValue
Assigns the associated value.- Specified by:
setValue
in interfaceNameValue<T extends AnchorBean<?>>
- Parameters:
item
- value to assign
-
getName
The name associated withitem
.- Specified by:
getName
in interfaceNameValue<T extends AnchorBean<?>>
- Returns:
- the name
-
setName
The name associated withitem
.- Specified by:
setName
in interfaceNameValue<T extends AnchorBean<?>>
- Parameters:
name
- name to assign
-
getItem
The item that is to be named, the underlying bean. -
setItem
The item that is to be named, the underlying bean.
-