org.jdesktop.wonderland.client.assetmgr
Class AssetID

java.lang.Object
  extended by org.jdesktop.wonderland.client.assetmgr.AssetID

public class AssetID
extends java.lang.Object

An AssetID class represents a unique identification for an asset: assets are uniquely identified by their URI and their (optional) checksum. This class implements the equals() and hashCode() methods so that instances of this class may be used as keys in Maps, for example.

Author:
Jordan Slott

Constructor Summary
AssetID(AssetURI assetURI, java.lang.String checksum)
          Constructor, takes both URI and checksum
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if the given asset ID equals this ID, false if not.
 AssetURI getAssetURI()
          Returns the asset uri.
 java.lang.String getChecksum()
          Returns the asset checksum.
 int hashCode()
           
 java.lang.String toString()
          Returns a string representation of the Asset ID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssetID

public AssetID(AssetURI assetURI,
               java.lang.String checksum)
Constructor, takes both URI and checksum

Method Detail

getAssetURI

public AssetURI getAssetURI()
Returns the asset uri.

Returns:
The AssetURI object

getChecksum

public java.lang.String getChecksum()
Returns the asset checksum.

Returns:
The asset Checksum

toString

public java.lang.String toString()
Returns a string representation of the Asset ID

Overrides:
toString in class java.lang.Object
Returns:
A string representation

equals

public boolean equals(java.lang.Object obj)
Returns true if the given asset ID equals this ID, false if not. Asset IDs are equal if both assets have the same URI and checksum

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Open Wonderland - http://openwonderland.org