Class InMemoryStorage

  • All Implemented Interfaces:
    Storage

    public final class InMemoryStorage
    extends Object
    implements Storage
    Storage that keeps everything in memory. This storage is rather useful for unit tests.
    Since:
    0.2
    • Constructor Detail

      • InMemoryStorage

        public InMemoryStorage()
        Constructor.
      • InMemoryStorage

        public InMemoryStorage​(List<XmirEntry> container)
        Constructor.
        Parameters:
        container - Container where everything is stored.
    • Method Detail

      • save

        public void save​(XmirEntry xmir)
        Description copied from interface: Storage
        Save XMIR.
        Specified by:
        save in interface Storage
        Parameters:
        xmir - XMIR to save
      • last

        public XmirEntry last()
        Get the last saved entry.
        Returns:
        The last saved entry.