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.voidThe item that is to be named, the underlying bean.voidThe name associated withitem.voidAssigns 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, onInitializationMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitializedMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
NamedBean
Creates a newNamedBeaninstance.- 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:AnchorBeanBy default, we useAnchorBean.describeBean()as the string representation of the bean.- Overrides:
toStringin classAnchorBean<NamedBean<T extends AnchorBean<?>>>- Returns:
- the string representation
-
getValue
Description copied from interface:NameValueThe associated value.- Specified by:
getValuein interfaceNameValue<T extends AnchorBean<?>>- Returns:
- the value
-
setValue
Description copied from interface:NameValueAssigns the associated value.- Specified by:
setValuein interfaceNameValue<T extends AnchorBean<?>>- Parameters:
item- value to assign
-
getName
The name associated withitem.- Specified by:
getNamein interfaceNameValue<T extends AnchorBean<?>>- Returns:
- the name
-
setName
The name associated withitem.- Specified by:
setNamein 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.
-