generated.docs.javadoc.org.eclipse.dawnsci.analysis.tree.impl.AttributeImpl.html Maven / Gradle / Ivy
AttributeImpl (h5jan API)
org.eclipse.dawnsci.analysis.tree.impl
Class AttributeImpl
- java.lang.Object
-
- org.eclipse.dawnsci.analysis.tree.impl.AttributeImpl
-
- All Implemented Interfaces:
- java.io.Serializable, Attribute
public class AttributeImpl
extends java.lang.Object
implements Attribute, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected static long
serialVersionUID
-
Constructor Summary
Constructors
Constructor and Description
AttributeImpl(java.lang.String attrName)
Create an attribute with node, name
AttributeImpl(java.lang.String attrName,
java.lang.Object attrValue)
Create an attribute with node, name.
AttributeImpl(java.lang.String attrName,
java.lang.Object attrValue,
boolean isUnsigned)
Create an attribute with node, name, value and a flag indicating whether value is unsigned
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
java.lang.String
getFirstElement()
java.lang.String
getName()
int
getRank()
int[]
getShape()
int
getSize()
Get number of items in attribute dataset
java.lang.String
getTypeName()
Dataset
getValue()
Get dataset holding value(s) of attribute
boolean
isString()
void
setTypeName(java.lang.String name)
Set name of attribute type
void
setValue(java.lang.Object obj)
Set value of attribute from given object
void
setValue(java.lang.Object obj,
boolean isUnsigned)
Set value of attribute from given object
java.lang.String
toString()
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
- See Also:
- Constant Field Values
-
Constructor Detail
-
AttributeImpl
public AttributeImpl(java.lang.String attrName)
Create an attribute with node, name
- Parameters:
attrName
-
-
AttributeImpl
public AttributeImpl(java.lang.String attrName,
java.lang.Object attrValue)
Create an attribute with node, name. The value is treated as a signed for applicable value types.
- Parameters:
attrName
- attribute name
attrValue
- attribute value
-
AttributeImpl
public AttributeImpl(java.lang.String attrName,
java.lang.Object attrValue,
boolean isUnsigned)
Create an attribute with node, name, value and a flag indicating whether value is unsigned
- Parameters:
attrName
-
attrValue
- (usually, this is a Java array)
isUnsigned
- true
if items are unsigned but held in signed primitives,
false
otherwise
-
Method Detail
-
getName
public java.lang.String getName()
-
isString
public boolean isString()
-
getTypeName
public java.lang.String getTypeName()
- Specified by:
getTypeName
in interface Attribute
- Returns:
- name of attribute type
-
setTypeName
public void setTypeName(java.lang.String name)
Description copied from interface: Attribute
Set name of attribute type
- Specified by:
setTypeName
in interface Attribute
-
getRank
public int getRank()
-
getShape
public int[] getShape()
-
getSize
public int getSize()
Description copied from interface: Attribute
Get number of items in attribute dataset
-
getFirstElement
public java.lang.String getFirstElement()
- Specified by:
getFirstElement
in interface Attribute
- Returns:
- first element as string
-
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
-
getValue
public Dataset getValue()
Description copied from interface: Attribute
Get dataset holding value(s) of attribute
-
setValue
public void setValue(java.lang.Object obj)
Description copied from interface: Attribute
Set value of attribute from given object