Class CombinedResourceInfo.Builder

  • Enclosing class:

    public static final class CombinedResourceInfo.Builder
    extends Object
    Use this builder to create an instance of combined resource info and put it in the cache if absent.
    Bauke Scholtz
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • add

        public CombinedResourceInfo.Builder add​(ResourceIdentifier resourceIdentifier)
        Add the resource represented by the given resource identifier resources of this combined resource info. The insertion order is maintained and duplicates are filtered.
        resourceIdentifier - The resource identifier of the resource to be added.
        This builder.
      • isEmpty

        public boolean isEmpty()
        Returns true if there are no resources been added. Use this method before create() if it's unknown if there are any resources been added.
        True if there are no resources been added, otherwise false.
      • create

        public String create()
        Creates the CombinedResourceInfo instance in cache if absent and return its ID.
        The ID of the CombinedResourceInfo instance.
        IllegalStateException - If there are no resources been added. So, to prevent it beforehand, use the isEmpty() method to check if there are any resources been added.