com.sun.tdk.specdiff.html.stat

## Class Context

- java.lang.Object
- - com.sun.tdk.specdiff.html.stat.Context

- All Implemented Interfaces:
    java.lang.Comparable<Context>

      public class Context
      extends java.lang.Object
      implements java.lang.Comparable<Context>

  Document context VO. Not thread safe!

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Context()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addAssertion(Assertion a)` Adds assertion with checking
    `void` | `addAttribute(Attribute a)`
    `int` | `compareTo(Context other)`
    `boolean` | `equals(java.lang.Object obj)`
    `java.util.Collection<Assertion>` | `getAssertList()`
    `java.lang.String` | `getAttribute(java.lang.String name)`
    `java.util.Collection<Attribute>` | `getAttributes()`
    `org.outerj.daisy.diff.html.modification.ModificationType` | `getModificationType()`
    `java.lang.String` | `getName()`
    `int` | `hashCode()`
    `boolean` | `hasValidTests()`
    `boolean` | `isNontestable()` Returns `true` if the context is non-testable.
    `boolean` | `isRevised()`
    `void` | `setModificationType(org.outerj.daisy.diff.html.modification.ModificationType mt)`
    `void` | `setName(java.lang.String name)`
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Context

          public Context()

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

    - #### setName

          public void setName(java.lang.String name)

    - #### getAttributes

          public java.util.Collection<Attribute> getAttributes()

    - #### addAttribute

          public void addAttribute(Attribute a)

    - #### getAttribute

          public java.lang.String getAttribute(java.lang.String name)

    - #### isNontestable

          public boolean isNontestable()

      Returns `true` if the context is non-testable. A context is considered non-testable if one of the following holds:
      - 1. It is explicitly marked with "nontestable" attribute
      - 2. It contains at least one assertion and all contained assertions are non-testable.
      - 3. It does not contain assertions at all and `isRevised()` returns `true`.
      Returns:
        true if the context is non-testable.

    - #### isRevised

          public boolean isRevised()

    - #### hasValidTests

          public boolean hasValidTests()

    - #### setModificationType

          public void setModificationType(org.outerj.daisy.diff.html.modification.ModificationType mt)

    - #### getModificationType

          public org.outerj.daisy.diff.html.modification.ModificationType getModificationType()

    - #### getAssertList

          public java.util.Collection<Assertion> getAssertList()

    - #### addAssertion

          public boolean addAssertion(Assertion a)

      Adds assertion with checking

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### compareTo

          public int compareTo(Context other)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<Context>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`