org.peaseplate.internal.model
Class DefaultResourceKey

java.lang.Object
  extended by org.peaseplate.internal.model.DefaultResourceKey
All Implemented Interfaces:
java.io.Serializable, ResourceKey

public class DefaultResourceKey
extends java.lang.Object
implements ResourceKey

The default implementation of the ResourceKey interface.

Author:
Manfred HANTSCHEL
See Also:
Serialized Form

Constructor Summary
DefaultResourceKey(java.lang.String name, java.util.Locale locale, java.lang.String encoding)
           
 
Method Summary
 boolean equals(java.lang.Object object)
          Must implement the equals method
 java.lang.String getEncoding()
          Returns the encoding of the resource
 java.util.Locale getLocale()
          Returns the locale of the resource
 java.lang.String getName()
          Returns the name of the resource
 ResourceKey getParent()
          Returns a resource key with the same name and the parent locale If the locale is already null, there is no parent and it returns null.
 int hashCode()
          Must implement the hashCode method
 java.lang.String toString()
          Returns a textual representation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultResourceKey

public DefaultResourceKey(java.lang.String name,
                          java.util.Locale locale,
                          java.lang.String encoding)
                   throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ResourceKey
Returns the name of the resource

Specified by:
getName in interface ResourceKey
Returns:
the name of the resource
See Also:
ResourceKey.getName()

getLocale

public java.util.Locale getLocale()
Description copied from interface: ResourceKey
Returns the locale of the resource

Specified by:
getLocale in interface ResourceKey
Returns:
the locale of the resource
See Also:
ResourceKey.getLocale()

getEncoding

public java.lang.String getEncoding()
Description copied from interface: ResourceKey
Returns the encoding of the resource

Specified by:
getEncoding in interface ResourceKey
Returns:
the encoding of the resource
See Also:
ResourceKey.getEncoding()

getParent

public ResourceKey getParent()
Description copied from interface: ResourceKey
Returns a resource key with the same name and the parent locale If the locale is already null, there is no parent and it returns null.

Specified by:
getParent in interface ResourceKey
Returns:
the parent or null
See Also:
ResourceKey.getParent()

equals

public boolean equals(java.lang.Object object)
Description copied from interface: ResourceKey
Must implement the equals method

Specified by:
equals in interface ResourceKey
Overrides:
equals in class java.lang.Object
Parameters:
object - the object to compare
Returns:
true if equal
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Description copied from interface: ResourceKey
Must implement the hashCode method

Specified by:
hashCode in interface ResourceKey
Overrides:
hashCode in class java.lang.Object
Returns:
the hashCode
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Description copied from interface: ResourceKey
Returns a textual representation

Specified by:
toString in interface ResourceKey
Overrides:
toString in class java.lang.Object
Returns:
a textual representation
See Also:
Object.toString()


Copyright © 2008. All Rights Reserved.