Documentation of 'hep.aida.ref.Annotation' Java class
Annotation
hep.aida.ref

Class Annotation

  • All Implemented Interfaces:
    IAnnotation, java.lang.Cloneable


    public class Annotation
    extends java.lang.Object
    implements IAnnotation, java.lang.Cloneable
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String aidaPathKey 
      static java.lang.String fullPathKey 
      static java.lang.String titleKey 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addItem(java.lang.String key, java.lang.String value)
      Add a key/value pair with a given visibility.
      void addItem(java.lang.String key, java.lang.String value, boolean sticky)
      Add a key/value pair with a given sticky flag.
      java.lang.Object clone() 
      int findKey(java.lang.String key)
      Find the index of a key.
      boolean hasKey(java.lang.String key)
      Check if a given key exists in IAnnotation
      boolean isFillable() 
      boolean isSticky(int index)
      Get the stickyness corresponding to the item in a give position in the Annotation.
      boolean isSticky(java.lang.String key)
      Get the stickyness for a given key.
      java.lang.String key(int index)
      Get the key corresponding to the item in a given position in the Annotation.
      void removeItem(java.lang.String key)
      Remove the item indicated by a given key.
      void reset()
      Reset the contents of the Annotation.
      void setFillable(boolean fillable)
      If annotation is fillable, can modified.
      void setSticky(java.lang.String key, boolean sticky)
      Set stickyness for a given key.
      void setValue(java.lang.String key, java.lang.String value)
      Set value for a given key.
      int size()
      Get the number of items in the Annotation.
      java.lang.String value(int index)
      Get the value corresponding to the item in a given position in the Annotation.
      java.lang.String value(java.lang.String key)
      Retrieve the value for a given key.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • titleKey

        public static java.lang.String titleKey
      • aidaPathKey

        public static java.lang.String aidaPathKey
      • fullPathKey

        public static java.lang.String fullPathKey
    • Constructor Detail

      • Annotation

        public Annotation()
        Creates a new instance of Annotation.
    • Method Detail

      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • setFillable

        public void setFillable(boolean fillable)
        If annotation is fillable, can modified. othervisw throws ReadOnlyException.
      • isFillable

        public boolean isFillable()
      • addItem

        public void addItem(java.lang.String key,
                            java.lang.String value)
        Add a key/value pair with a given visibility.
        Specified by:
        addItem in interface IAnnotation
        Parameters:
        key - The key to be added.
        value - The key's value. not be removed when the method reset or removeItem are invoked. The default value for the sticky flag is false.
      • addItem

        public void addItem(java.lang.String key,
                            java.lang.String value,
                            boolean sticky)
        Description copied from interface: IAnnotation
        Add a key/value pair with a given sticky flag. If key alredy exists, its value is overwritten.
        Specified by:
        addItem in interface IAnnotation
        Parameters:
        key - The key to be added.
        value - The key's value.
        sticky - The key's sticky flag. If true the item will not be removed when the method reset or removeItem are invoked. The default value for the sticky flag is false.
      • removeItem

        public void removeItem(java.lang.String key)
        Remove the item indicated by a given key.
        Specified by:
        removeItem in interface IAnnotation
        Parameters:
        key - The key to be removed. If the key is flagged as "sticky" it will not be removed.
      • value

        public java.lang.String value(java.lang.String key)
        Retrieve the value for a given key.
        Specified by:
        value in interface IAnnotation
        Parameters:
        key - The key.
        Returns:
        The value of the corresponding item.
      • setValue

        public void setValue(java.lang.String key,
                             java.lang.String value)
        Set value for a given key.
        Specified by:
        setValue in interface IAnnotation
        Parameters:
        key - The item's key.
        value - The new value for the correponding item.
      • isSticky

        public boolean isSticky(java.lang.String key)
        Get the stickyness for a given key.
        Specified by:
        isSticky in interface IAnnotation
        Parameters:
        key - The item's key.
        Returns:
        The stickyness for the corresponding item.
      • setSticky

        public void setSticky(java.lang.String key,
                              boolean sticky)
        Set stickyness for a given key.
        Specified by:
        setSticky in interface IAnnotation
        Parameters:
        key - The item's key.
        sticky - The new stickyness for the correponding item.
      • size

        public int size()
        Get the number of items in the Annotation.
        Specified by:
        size in interface IAnnotation
        Returns:
        The size of the Annotation.
      • key

        public java.lang.String key(int index)
        Get the key corresponding to the item in a given position in the Annotation.
        Specified by:
        key in interface IAnnotation
        Parameters:
        index - The item's index.
        Returns:
        The corresponding key.
      • value

        public java.lang.String value(int index)
        Get the value corresponding to the item in a given position in the Annotation.
        Specified by:
        value in interface IAnnotation
        Parameters:
        index - The item's index.
        Returns:
        The corresponding value.
      • isSticky

        public boolean isSticky(int index)
        Get the stickyness corresponding to the item in a give position in the Annotation.
        Parameters:
        index - The item's index.
        Returns:
        The stickyness for the corresponding item.
      • reset

        public void reset()
        Reset the contents of the Annotation.
        Specified by:
        reset in interface IAnnotation
      • findKey

        public int findKey(java.lang.String key)
        Description copied from interface: IAnnotation
        Find the index of a key.
        Specified by:
        findKey in interface IAnnotation
        Parameters:
        key - The key to find.
        Returns:
        The key index. Return -1 if not found.
      • hasKey

        public boolean hasKey(java.lang.String key)
        Description copied from interface: IAnnotation
        Check if a given key exists in IAnnotation
        Specified by:
        hasKey in interface IAnnotation
        Parameters:
        key - The item's key.
        Returns:
        true if the key exists.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.