Class EquivalentAtmComboScanner.Visited

java.lang.Object
org.checkerframework.framework.type.visitor.EquivalentAtmComboScanner.Visited
Enclosing class:
EquivalentAtmComboScanner<RETURN_TYPE,PARAM>

protected class EquivalentAtmComboScanner.Visited extends Object
A history of type pairs that have already been visited and the return type of their visit.

The table, slotFor(java.lang.Object[], java.lang.Object, java.lang.Object), EquivalentAtmComboScanner.INITIAL_CAPACITY and EquivalentAtmComboScanner.ENTRY_SLOTS are package-private so that the unit test of this class can inspect the table layout.

  • Method Details

    • isEmpty

      public boolean isEmpty()
      Returns true if no pairs have been recorded.
      Returns:
      true if no pairs have been recorded
    • clear

      public void clear()
      Clears the history. A table of the initial size is cleared in place; a larger one is dropped, so that the cost of clearing stays bounded.
    • contains

      public boolean contains(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2)
      Returns true if the given pair has been recorded.
      Parameters:
      type1 - the first type
      type2 - the second type
      Returns:
      true if the given pair has been recorded
    • getResult

      Returns the result recorded for the given pair, or null if none was recorded.
      Parameters:
      type1 - the first type
      type2 - the second type
      Returns:
      the result recorded for the given pair, or null if none was recorded
    • add

      public void add(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, RETURN_TYPE ret)
      Add a new pair to the history.
      Parameters:
      type1 - the first type
      type2 - the second type
      ret - the result