org.eclipse.incquery.runtime.matchers.psystem.annotations

## Class PAnnotation

- java.lang.Object
- - org.eclipse.incquery.runtime.matchers.psystem.annotations.PAnnotation

-     public class PAnnotation
      extends java.lang.Object

  A container describing query annotations
  Author:
    Zoltan Ujhelyi

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PAnnotation(java.lang.String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAttribute(java.lang.String attributeName, java.lang.Object value)` Adds an attribute to the annotation
    `java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.Object>>` | `getAllValues()` Returns all values of all attributes.
    `java.util.List<java.lang.Object>` | `getAllValues(java.lang.String attributeName)` Returns all values of a selected attribute
    `java.lang.Object` | `getFirstValue(java.lang.String attributeName)` Returns the value of the first occurrence of an attribute
    `java.lang.String` | `getName()` Return the name of the annotation

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PAnnotation

          public PAnnotation(java.lang.String name)

  - ### Method Detail

    - #### addAttribute

          public void addAttribute(java.lang.String attributeName,
                                   java.lang.Object value)

      Adds an attribute to the annotation
      Parameters:
        `attributeName` -
        `value` -

    - #### getName

          public java.lang.String getName()

      Return the name of the annotation

    - #### getFirstValue

          public java.lang.Object getFirstValue(java.lang.String attributeName)

      Returns the value of the first occurrence of an attribute
      Parameters:
        `attributeName` -
      Returns:
        the attribute value, or null, if attribute is not available

    - #### getAllValues

          public java.util.List<java.lang.Object> getAllValues(java.lang.String attributeName)

      Returns all values of a selected attribute
      Parameters:
        `attributeName` -
      Returns:
        a non-null, but possibly empty list of attributes

    - #### getAllValues

          public java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.Object>> getAllValues()

      Returns all values of all attributes. A selected attribute name (key) can appear multiple times in the collection.