Interface MapWithScope.Allocator<A,B,S>

Enclosing class:
MapWithScope<A,B,S>

public static interface MapWithScope.Allocator<A,B,S>
Allocate a B, given some A. Only called once per instance of B if the ScopePolicy map is non-null.
  • Method Summary

    Modifier and Type
    Method
    Description
    alloc(S scope, A item)
    Allocate - return the same B for a given A.
    Create a fresh, unique (to within policy) B
    void
     
  • Method Details

    • alloc

      B alloc(S scope, A item)
      Allocate - return the same B for a given A. "same" means .equals, not ==
    • create

      B create()
      Create a fresh, unique (to within policy) B
    • reset

      void reset()