Interface Container

All Known Subinterfaces:
Source
All Known Implementing Classes:
DataBufferSource, DiskCopyImage, FileEntrySource, FileSource, UniversalDiskImage

public interface Container
Container marks an object that contains other objects for retrieval. Experimental - the idea is to no longer expose everything that *might* apply, but instead test if it's there and react accordingly.

The end goal is to be able to retrieve the various devices - than have to be handled distinctly anyway - and work from that. A DOS disk won't be backed by a BlockDevice (most of the time), so it's counterintuitive that the DOS file system has block level access. Vice versa for ProDOS/Pascal/RDOS/CPM. Not to mention that it doesn't apply to Shrinkit or Zip archives at all.

  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Optional<T>
    get(Class<T> iface)
     
    static <T> Optional<T>
    get(Class<T> iface, Object... objects)
    This helper method implements the interface logic.
  • Method Details

    • get

      <T> Optional<T> get(Class<T> iface)
    • get

      static <T> Optional<T> get(Class<T> iface, Object... objects)
      This helper method implements the interface logic. Just use it with:

          @Override
          public <T> Optional<T> get(Class<T> iface) {
              return Container.get(iface, this, object1, object2);
          }