org.richfaces.resource

## Class ResourceKey

- java.lang.Object
- - org.richfaces.resource.ResourceKey

-     public final class ResourceKey
      extends Object

  Encapsulates resource name and resource library
  Author:
    Nick Belaevski

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static com.google.common.base.Function<String,ResourceKey>` | `FACTORY` A function for creating `ResourceKey` from strings by calling `create(String)` factory.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceKey(String resourceName, String libraryName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ResourceKey` | `create(javax.faces.application.Resource resource)` Factory method for creating resource key from `Resource`
    `static ResourceKey` | `create(String resourceQualifier)` Factory method for creating resource key from single resource qualifier in format library:resource
    `static ResourceKey` | `create(String resourceName, String libraryName)` Factory method for creating resource key from resource and library name
    `boolean` | `equals(Object obj)`
    `String` | `getLibraryName()` Returns library's name
    `String` | `getResourceName()` Returns resource's name
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### FACTORY

          public static final com.google.common.base.Function<String,ResourceKey> FACTORY

      A function for creating `ResourceKey` from strings by calling `create(String)` factory.

  - ### Constructor Detail

    - #### ResourceKey

          public ResourceKey(String resourceName,
                     String libraryName)

  - ### Method Detail

    - #### getResourceName

          public String getResourceName()

      Returns resource's name

    - #### getLibraryName

          public String getLibraryName()

      Returns library's name

    - #### create

          public static ResourceKey create(String resourceQualifier)

      Factory method for creating resource key from single resource qualifier in format library:resource

    - #### create

          public static ResourceKey create(String resourceName,
                           String libraryName)

      Factory method for creating resource key from resource and library name

    - #### create

          public static ResourceKey create(javax.faces.application.Resource resource)

      Factory method for creating resource key from `Resource`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014 JBoss by Red Hat. All Rights Reserved.