Interface IMarkerDelta


public interface IMarkerDelta
A marker delta describes the change to a single marker. A marker can either be added, removed or changed. Marker deltas give access to the state of the marker as it was (in the case of deletions and changes) before the modifying operation occurred.
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Method Summary

    Modifier and Type
    Method
    Description
    getAttribute(String attributeName)
    Returns the object attribute with the given name.
    boolean
    getAttribute(String attributeName, boolean defaultValue)
    Returns the boolean-valued attribute with the given name.
    int
    getAttribute(String attributeName, int defaultValue)
    Returns the integer-valued attribute with the given name.
    getAttribute(String attributeName, String defaultValue)
    Returns the string-valued attribute with the given name.
    Returns a Map with all the attributes for the marker.
    getAttributes(String[] attributeNames)
    Returns the attributes with the given names.
    long
    Returns the id of the marker.
    int
    Returns the kind of this marker delta: one of IResourceDelta.ADDED, IResourceDelta.REMOVED, or IResourceDelta.CHANGED.
    Returns the marker described by this change.
    Returns the resource with which this marker is associated.
    Returns the type of this marker.
    boolean
    isSubtypeOf(String superType)
    Returns whether the type of this marker is considered to be a sub-type of the given marker type.
  • Method Details

    • getAttribute

      Object getAttribute(String attributeName)
      Returns the object attribute with the given name. The result is an instance of one of the following classes: String, Integer, or Boolean. Returns null if the attribute is undefined. The set of valid attribute names is defined elsewhere.

      If kind is IResourceDelta.ADDED, then the information is from the new marker, otherwise it is from the old marker.

      Parameters:
      attributeName - the name of the attribute
      Returns:
      the value, or null if the attribute is undefined.
    • getAttribute

      int getAttribute(String attributeName, int defaultValue)
      Returns the integer-valued attribute with the given name. Returns the given default value if the attribute is undefined or is not an integer value.

      If kind is IResourceDelta.ADDED, then the information is from the new marker, otherwise it is from the old marker.

      Parameters:
      attributeName - the name of the attribute
      defaultValue - the value to use if the attribute does not exist
      Returns:
      the value or the default value if the attribute is undefined.
    • getAttribute

      String getAttribute(String attributeName, String defaultValue)
      Returns the string-valued attribute with the given name. Returns the given default value if the attribute is undefined or is not a string value.

      If kind is IResourceDelta.ADDED, then the information is from the new marker, otherwise it is from the old marker.

      Parameters:
      attributeName - the name of the attribute
      defaultValue - the value to use if the attribute does not exist
      Returns:
      the value or the default value if the attribute is undefined.
    • getAttribute

      boolean getAttribute(String attributeName, boolean defaultValue)
      Returns the boolean-valued attribute with the given name. Returns the given default value if the attribute is undefined or is not a boolean value.

      If kind is IResourceDelta.ADDED, then the information is from the new marker, otherwise it is from the old marker.

      Parameters:
      attributeName - the name of the attribute
      defaultValue - the value to use if the attribute does not exist
      Returns:
      the value or the default value if the attribute is undefined.
    • getAttributes

      Map<String,Object> getAttributes()
      Returns a Map with all the attributes for the marker. The result is a Map whose keys are attributes names and whose values are attribute values. Each value an instance of one of the following classes: String, Integer, or Boolean. If the marker has no attributes then null is returned.

      If kind is IResourceDelta.ADDED, then the information is from the new marker, otherwise it is from the old marker.

      Returns:
      a map of attribute keys and values (key type : String value type : String, Integer, or Boolean) or null.
    • getAttributes

      Object[] getAttributes(String[] attributeNames)
      Returns the attributes with the given names. The result is an array whose elements correspond to the elements of the given attribute name array. Each element is null or an instance of one of the following classes: String, Integer, or Boolean.

      If kind is IResourceDelta.ADDED, then the information is from the new marker, otherwise it is from the old marker.

      Parameters:
      attributeNames - the names of the attributes
      Returns:
      the values of the given attributes.
    • getId

      long getId()
      Returns the id of the marker. The id of a marker is unique relative to the resource with which the marker is associated. Marker ids are not globally unique.
      Returns:
      the id of the marker
    • getKind

      int getKind()
      Returns the kind of this marker delta: one of IResourceDelta.ADDED, IResourceDelta.REMOVED, or IResourceDelta.CHANGED.
      Returns:
      the kind of marker delta
      See Also:
    • getMarker

      IMarker getMarker()
      Returns the marker described by this change. If kind is IResourceDelta.REMOVED, then this is the old marker, otherwise this is the new marker. Note that if the marker was deleted, the value returned cannot be used to access attributes.
      Returns:
      the marker
    • getResource

      IResource getResource()
      Returns the resource with which this marker is associated.
      Returns:
      the resource
    • getType

      String getType()
      Returns the type of this marker.

      If kind is IResourceDelta.ADDED, then the information is from the new marker, otherwise it is from the old marker.

      Returns:
      the type of this marker
    • isSubtypeOf

      boolean isSubtypeOf(String superType)
      Returns whether the type of this marker is considered to be a sub-type of the given marker type.

      If kind is IResourceDelta.ADDED, then the information is from the new marker, otherwise it is from the old marker.

      Returns:
      boolean trueif the marker's type is the same as (or a sub-type of) the given type.