All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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() 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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()
        Specified by:
        getName in interface Attribute
        Returns:
        name of attribute
      • isString

        public boolean isString()
        Specified by:
        isString in interface Attribute
        Returns:
        true if attribute contains strings
      • 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()
        Specified by:
        getRank in interface Attribute
        Returns:
        rank of attribute dataset
      • getShape

        public int[] getShape()
        Specified by:
        getShape in interface Attribute
        Returns:
        shape of attribute dataset
      • getSize

        public int getSize()
        Description copied from interface: Attribute
        Get number of items in attribute dataset
        Specified by:
        getSize in interface Attribute
        Returns:
        size
      • 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
        Specified by:
        getValue in interface Attribute
        Returns:
        dataset
      • setValue

        public void setValue(java.lang.Object obj)
        Description copied from interface: Attribute
        Set value of attribute from given object
        Specified by:
        setValue in interface Attribute
      • setValue

        public void setValue(java.lang.Object obj,
                             boolean isUnsigned)
        Description copied from interface: Attribute
        Set value of attribute from given object
        Specified by:
        setValue in interface Attribute
        isUnsigned - if true, interpret integer values as unsigned by increasing element bit width




© 2015 - 2024 Weber Informatics LLC | Privacy Policy