java.lang.Object
org.omnifaces.resourcehandler.CombinedResourceInfo
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classUse this builder to create an instance of combined resource info and put it in the cache if absent. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the given object is also an instance ofCombinedResourceInfoand its ID equals to the ID of the current combined resource info instance.static CombinedResourceInfoReturns the combined resource info identified by the given ID from the cache.intReturns the content length in bytes of this combined resource info.longReturns the last modified timestamp in milliseconds of this combined resource info.Returns the ordered set of resource identifiers of this combined resource info.Returns the ordered set of resources of this combined resource info.inthashCode()Returns the sum of the hash code of this class and the ID.toString()Returns the string representation of this combined resource info in the format of
-
Method Details
-
get
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
Returns true if the given object is also an instance ofCombinedResourceInfoand its ID equals to the ID of the current combined resource info instance. -
hashCode
public int hashCode()Returns the sum of the hash code of this class and the ID. -
toString
Returns the string representation of this combined resource info in the format ofCombinedResourceInfo[id,resourceIdentifiers]
Whereidis the unique ID andresourceIdentifiersis the ordered set of all resource identifiers as is been created with the builder. -
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
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.
-