Class Mounts.Builder

  • Enclosing class:
    Mounts

    public static final class Mounts.Builder
    extends java.lang.Object
    Provides a fluent API from creating MountInfoProvider instances
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MountInfoProvider build()
      Creates a new MountInfoProvider
      Mounts.Builder mount​(java.lang.String name, boolean readOnly, java.util.List<java.lang.String> pathsSupportingFragments, java.util.List<java.lang.String> paths)
      Adds a new Mount instance with the specified parameters
      Mounts.Builder mount​(java.lang.String name, java.lang.String... paths)
      Adds a new read-write Mount with the specified name and paths
      Mounts.Builder readOnlyMount​(java.lang.String name, java.lang.String... paths)
      Adds a new read-only Mount with the specified name and paths
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • mount

        public Mounts.Builder mount​(java.lang.String name,
                                    java.lang.String... paths)
        Adds a new read-write Mount with the specified name and paths
        Parameters:
        name - the name of the mount
        paths - the paths handled by the mount
        Returns:
        this builder instance
      • readOnlyMount

        public Mounts.Builder readOnlyMount​(java.lang.String name,
                                            java.lang.String... paths)
        Adds a new read-only Mount with the specified name and paths
        Parameters:
        name - the name of the mount
        paths - the paths handled by the mount
        Returns:
        this builder instance
      • mount

        public Mounts.Builder mount​(java.lang.String name,
                                    boolean readOnly,
                                    java.util.List<java.lang.String> pathsSupportingFragments,
                                    java.util.List<java.lang.String> paths)
        Adds a new Mount instance with the specified parameters
        Parameters:
        name - the name of the mount
        readOnly - true for read-only paths, false otherwise
        pathsSupportingFragments - the paths supporting fragments, see Mount.getPathFragmentName()
        paths - the paths handled by the mount
        Returns:
        this builder instance