public interface IReadonlyAttributeContainer extends Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAttribute(String sName)
Check if an attribute of the given name is contained.
|
boolean |
containsNoAttribute() |
Set<String> |
getAllAttributeNames() |
Map<String,Object> |
getAllAttributes() |
Collection<Object> |
getAllAttributeValues() |
boolean |
getAttributeAsBoolean(String sName)
Get the attribute value associated to the given attribute name.
|
boolean |
getAttributeAsBoolean(String sName,
boolean bDefault)
Get the attribute value associated to the given attribute name.
|
double |
getAttributeAsDouble(String sName)
Get the attribute value associated to the given attribute name.
|
double |
getAttributeAsDouble(String sName,
double dDefault)
Get the attribute value associated to the given attribute name.
|
int |
getAttributeAsInt(String sName)
Get the attribute value associated to the given attribute name.
|
int |
getAttributeAsInt(String sName,
int nDefault)
Get the attribute value associated to the given attribute name.
|
long |
getAttributeAsLong(String sName)
Get the attribute value associated to the given attribute name.
|
long |
getAttributeAsLong(String sName,
long nDefault)
Get the attribute value associated to the given attribute name.
|
String |
getAttributeAsString(String sName)
Get the attribute value associated to the given attribute name.
|
String |
getAttributeAsString(String sName,
String sDefault)
Get the attribute value associated to the given attribute name or the
passed default value if no such attribute is present.
|
int |
getAttributeCount() |
Enumeration<String> |
getAttributeNames()
Get an enumerator over all contained attribute names.
|
Object |
getAttributeObject(String sName)
Get the attribute value associated to the given attribute name.
|
<DATATYPE> DATATYPE |
getCastedAttribute(String sName)
Get the attribute value associated to the given attribute name.
|
<DATATYPE> DATATYPE |
getCastedAttribute(String sName,
DATATYPE aDefault)
Get the attribute value associated to the given attribute name.
|
<DATATYPE> DATATYPE |
getTypedAttribute(String sName,
Class<DATATYPE> aDstClass)
Get the attribute value associated to the given attribute name.
|
<DATATYPE> DATATYPE |
getTypedAttribute(String sName,
Class<DATATYPE> aDstClass,
DATATYPE aDefault)
Get the attribute value associated to the given attribute name.
|
@Nonnegative int getAttributeCount()
boolean containsNoAttribute()
true if this attribute container does not contain any
attribute at all, false if at least one attribute is
contained.boolean containsAttribute(@Nullable String sName)
sName - name of the attribute to checktrue if the attribute is contained, false
otherwise@Nonnull @ReturnsMutableCopy Map<String,Object> getAllAttributes()
null map with all contained attributes.@Nullable Object getAttributeObject(@Nullable String sName)
sName - the attribute namenull if no such value exists@Nullable <DATATYPE> DATATYPE getCastedAttribute(@Nullable String sName)
ClassCastException is thrown! If you just want to
retrieve a String, use getAttributeAsString(String)!getCastedAttribute(sName, null)DATATYPE - return typesName - the attribute namenull if no such value exists@Nullable <DATATYPE> DATATYPE getCastedAttribute(@Nullable String sName, @Nullable DATATYPE aDefault)
ClassCastException is thrown! If you just want to
retrieve a String, use getAttributeAsString(String, String)!DATATYPE - return typesName - The attribute name.aDefault - The default value to be returned if no such attribute exists@Nullable <DATATYPE> DATATYPE getTypedAttribute(@Nullable String sName, @Nonnull Class<DATATYPE> aDstClass)
getAttributeAsString(String)!getTypedAttribute(sName, null)DATATYPE - return typesName - the attribute nameaDstClass - The destination class to convert to. May not be null.null if no such value exists@Nullable <DATATYPE> DATATYPE getTypedAttribute(@Nullable String sName, @Nonnull Class<DATATYPE> aDstClass, @Nullable DATATYPE aDefault)
getAttributeAsString(String, String)!DATATYPE - return typesName - The attribute name.aDstClass - The destination class to convert to. May not be null.aDefault - The default value to be returned if no such attribute exists@Nullable String getAttributeAsString(@Nullable String sName)
getAttributeAsString (sName, null)sName - the attribute namenull if no such attribute
exists@Nullable String getAttributeAsString(@Nullable String sName, @Nullable String sDefault)
sName - the attribute namesDefault - The default value to be returned, if the passed attribute name is
unknownsDefault if no such attribute
existsint getAttributeAsInt(@Nullable String sName)
sName - the attribute nameCGlobal.ILLEGAL_UINT if no such attribute
existsint getAttributeAsInt(@Nullable String sName, int nDefault)
sName - the attribute namenDefault - the default value to be returned if the value is not presentnDefault if no such attribute
existslong getAttributeAsLong(@Nullable String sName)
sName - the attribute nameCGlobal.ILLEGAL_ULONG if no such
attribute existslong getAttributeAsLong(@Nullable String sName, long nDefault)
sName - the attribute namenDefault - the default value to be returned if the value is not presentnDefault if no such attribute
existsdouble getAttributeAsDouble(@Nullable String sName)
sName - the attribute nameCGlobal.ILLEGAL_UINT if no such attribute
existsdouble getAttributeAsDouble(@Nullable String sName, double dDefault)
sName - the attribute namedDefault - the default value to be returned if the value is not presentnDefault if no such attribute
existsboolean getAttributeAsBoolean(@Nullable String sName)
sName - the attribute namefalse if no such attribute
existsboolean getAttributeAsBoolean(@Nullable String sName, boolean bDefault)
sName - the attribute namebDefault - the default value to be returned if the value is not presentbDefault if no such attribute
exists@Nonnull Enumeration<String> getAttributeNames()
@Nonnull Set<String> getAllAttributeNames()
@Nonnull Collection<Object> getAllAttributeValues()
Copyright © 2006–2015 phloc systems. All rights reserved.