Class Cache.Builder<B extends Cache.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
Cache

public static class Cache.Builder<B extends Cache.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public Cache build()
      Finish building the Cache object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to Cache.
      Overrides:
      build in class GObject.Builder<B extends Cache.Builder<B>>
      Returns:
      a new instance of Cache with the properties that were set in the Builder object.
    • setCacheDir

      public B setCacheDir(String cacheDir)
      The directory to store the cache files.
      Parameters:
      cacheDir - the value for the cache-dir property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setCacheType

      public B setCacheType(CacheType cacheType)
      Whether the cache is private or shared.
      Parameters:
      cacheType - the value for the cache-type property
      Returns:
      the Builder instance is returned, to allow method chaining