Class CombinedResourceInfo


  • public final class CombinedResourceInfo
    extends Object

    This class is a wrapper which collects all combined resources and stores it in the cache. A builder has been provided to create an instance of combined resource info and put it in the cache if absent.

    Author:
    Bauke Scholtz
    • Method Detail

      • get

        public static CombinedResourceInfo get​(String id)
        Returns the combined resource info identified by the given ID from the cache. A new one will be created based on the given ID if absent in cache.
        Parameters:
        id - The ID of the combined resource info to be returned from the cache.
        Returns:
        The combined resource info identified by the given ID from the cache.
      • equals

        public boolean equals​(Object other)
        Returns true if the given object is also an instance of CombinedResourceInfo and its ID equals to the ID of the current combined resource info instance.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Returns the sum of the hash code of this class and the ID.
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Returns the string representation of this combined resource info in the format of
        CombinedResourceInfo[id,resourceIdentifiers]
        Where id is the unique ID and resourceIdentifiers is the ordered set of all resource identifiers as is been created with the builder.
        Overrides:
        toString in class Object
      • getResourceIdentifiers

        public Set<ResourceIdentifier> getResourceIdentifiers()
        Returns the ordered set of resource identifiers of this combined resource info.
        Returns:
        the ordered set of resource identifiers of this combined resource info.
      • getResources

        public Set<Resource> getResources()
        Returns the ordered set of resources of this combined resource info.
        Returns:
        The ordered set of resources of this combined resource info.
      • getContentLength

        public int getContentLength()
        Returns the content length in bytes of this combined resource info.
        Returns:
        The content length in bytes of this combined resource info.
      • getLastModified

        public long getLastModified()
        Returns the last modified timestamp in milliseconds of this combined resource info.
        Returns:
        The last modified timestamp in milliseconds of this combined resource info.