Package de.gebit.integrity.remoting.entities.setlist

## Class SetListEntry

- java.lang.Object
- - de.gebit.integrity.remoting.entities.setlist.SetListEntry

- All Implemented Interfaces:
    `Serializable`, `Cloneable`

      public class SetListEntry
      extends Object
      implements Serializable, Cloneable

  A set list entry is an entry in the `SetList`, which is a test execution and result data structure. The actual nature of an entry is defined by its type.
  Author:
    Rene Schneider - initial API and implementation
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SetListEntry()` | No-arg constructor required for serialization.
    `SetListEntry​(int anId, SetListEntryTypes aType)` | Creates a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SetListEntry` | `clone()` |
    `boolean` | `equals​(Object anOtherObject)` |
    `Serializable` | `getAttribute​(SetListEntryAttributeKeys aKey)` | Returns the attribute value for a specific key.
    `Serializable` | `getAttribute​(SetListEntryAttributeKeys aKey, Serializable aValueIfUnset)` | Returns the attribute value for a specific key, or a default value in case of the attribute being unset.
    `<T extends Serializable> T` | `getAttribute​(Class<T> anAttributeClass, SetListEntryAttributeKeys aKey)` | Convenience method to access an attribute.
    `<T extends Serializable> T` | `getAttribute​(Class<T> anAttributeClass, SetListEntryAttributeKeys aKey, T aValueIfUnset)` | Convenience method to access an attribute with default value.
    `int` | `getId()` |
    `SetListEntryTypes` | `getType()` | Returns the type.
    `int` | `hashCode()` |
    `void` | `setAttribute​(SetListEntryAttributeKeys aKey, Serializable aValue)` | Sets the attribute.
    `String` | `toString()` |

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SetListEntry

          public SetListEntry​(int anId,
                              SetListEntryTypes aType)

      Creates a new instance.
      Parameters:
        `anId` -
        `aType` -

    - #### SetListEntry

          public SetListEntry()

      No-arg constructor required for serialization.

  - ### Method Detail

    - #### getId

          public int getId()

    - #### equals

          public boolean equals​(Object anOtherObject)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getType

          public SetListEntryTypes getType()

      Returns the type. Performs automatic conversion to the `SetListEntryTypes` enum.
      Returns:

    - #### setAttribute

          public void setAttribute​(SetListEntryAttributeKeys aKey,
                                   Serializable aValue)

      Sets the attribute.
      Parameters:
        `aKey` - the attribute key
        `aValue` - the value to set

    - #### getAttribute

          public Serializable getAttribute​(SetListEntryAttributeKeys aKey)

      Returns the attribute value for a specific key.
      Parameters:
        `aKey` - the attribute key
      Returns:
        the value, or null if none was set

    - #### getAttribute

          public Serializable getAttribute​(SetListEntryAttributeKeys aKey,
                                           Serializable aValueIfUnset)

      Returns the attribute value for a specific key, or a default value in case of the attribute being unset.
      Parameters:
        `aKey` - the attribute key
        `aValueIfUnset` - the default value
      Returns:
        the attribute value or the default

    - #### getAttribute

          public <T extends Serializable> T getAttribute​(Class<T> anAttributeClass,
                                                         SetListEntryAttributeKeys aKey)

      Convenience method to access an attribute. Casts the attribute to a specified target class.
      Parameters:
        `anAttributeClass` - the target class
        `aKey` - the attribute key
      Returns:
        the casted attribute or null if not set or not castable to the specified class

    - #### getAttribute

          public <T extends Serializable> T getAttribute​(Class<T> anAttributeClass,
                                                         SetListEntryAttributeKeys aKey,
                                                         T aValueIfUnset)

      Convenience method to access an attribute with default value. Casts the attribute to a specified target class.
      Parameters:
        `anAttributeClass` - the target class
        `aKey` - the attribute key
        `aValueIfUnset` - the default value
      Returns:
        the casted value or the default if not set or not castable

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### clone

          public SetListEntry clone()

      Overrides:
        `clone` in class `Object`