Class InMemoryAssetTracker

  • All Implemented Interfaces:
    com.embabel.chat.AssetTracker , com.embabel.chat.AssetView

    
    public final class InMemoryAssetTracker
     implements AssetTracker
                        

    Simple in-memory implementation of AssetTracker for testing and ephemeral use cases.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final List<Asset> assets
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      List<Asset> getAssets() All tracked assets, in order in which they were added
      Unit addAsset(Asset asset) Add an asset to be tracked.
      final InMemoryAssetTracker withAsset(Asset asset) Convenience method to add an asset and return this tracker for chaining.
      • Methods inherited from class com.embabel.chat.AssetTracker

        addAnyReturnedAssets, addAnyReturnedAssets, addReturnedAssets, addReturnedAssets
      • Methods inherited from class com.embabel.chat.AssetView

        mostRecent, mostRecentlyAdded, references, since
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InMemoryAssetTracker

        InMemoryAssetTracker(Collection<Asset> initialAssets)