Class AbstractVfsContainer

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList<java.lang.Object> components
      The components contained by this component.
    • Field Detail

      • components

        private final java.util.ArrayList<java.lang.Object> components
        The components contained by this component.
    • Constructor Detail

      • AbstractVfsContainer

        public AbstractVfsContainer()
    • Method Detail

      • addComponent

        protected void addComponent​(java.lang.Object component)
                             throws FileSystemException
        Adds a sub-component to this component.

        If the sub-component implements VfsComponent, it is initialized. All sub-components are closed when this component is closed.

        Parameters:
        component - the component to add.
        Throws:
        FileSystemException - if any error occurs.
      • removeComponent

        protected void removeComponent​(java.lang.Object component)
        Removes a sub-component from this component.
        Parameters:
        component - the component to remove.
      • close

        public void close()
        Closes the sub-components of this component.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface VfsComponent
        Overrides:
        close in class AbstractVfsComponent