org.jfree.resourceloader

Class ResourceKey

Implemented Interfaces:
Serializable

public final class ResourceKey
extends java.lang.Object
implements Serializable

The key is an unique identifier for the resource. Most of the time, this may be an URL, but other (especially database based) schemas are possible. A resource key must provide an 'equals' implementation. ResourceKeys should be implemented as immutable classes, so that they can be safely stored in collections or on external storages (like caches).
Author:
Thomas Morgner

Constructor Summary

ResourceKey(Object schema, Object identifier, Map factoryParameters)
ResourceKey(ResourceKey parent, Object schema, Object identifier, Map factoryParameters)

Method Summary

boolean
equals(Object o)
Map
getFactoryParameters()
Object
getIdentifier()
ResourceKey
getParent()
Object
getSchema()
Returns the schema of this resource key.
int
hashCode()
String
toString()

Constructor Details

ResourceKey

public ResourceKey(Object schema,
                   Object identifier,
                   Map factoryParameters)

ResourceKey

public ResourceKey(ResourceKey parent,
                   Object schema,
                   Object identifier,
                   Map factoryParameters)

Method Details

equals

public boolean equals(Object o)

getFactoryParameters

public Map getFactoryParameters()

getIdentifier

public Object getIdentifier()

getParent

public ResourceKey getParent()

getSchema

public Object getSchema()
Returns the schema of this resource key. The schema is an internal identifier to locate the resource-loader implementation that was responsible for creating the key in the first place. The schema has no meaning outside the resource loading framework.
Returns:

hashCode

public int hashCode()

toString

public String toString()