com.jme.util
Class TextureKey

java.lang.Object
  extended by com.jme.util.TextureKey
All Implemented Interfaces:
Savable

public final class TextureKey
extends java.lang.Object
implements Savable

TextureKey provides a way for the TextureManager to cache and retrieve Texture objects.

Version:
$Id: TextureKey.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Joshua Slack

Field Summary
protected  int code
           
protected  java.lang.String fileType
           
protected  boolean flipped
           
protected  Image.Format format
           
protected  java.net.URL location
           
 
Constructor Summary
TextureKey()
           
TextureKey(java.net.URL location, boolean flipped, Image.Format imageType)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.Class getClassTag()
           
 java.lang.String getFileType()
           
 Image.Format getFormat()
           
 java.net.URL getLocation()
           
 int hashCode()
           
 boolean isFlipped()
           
 void read(JMEImporter e)
           
 void resetHashCode()
           
 void setFileType(java.lang.String fileType)
           
 void setFlipped(boolean flipped)
           
 void setFormat(Image.Format format)
           
 void setLocation(java.net.URL location)
           
 java.lang.String toString()
           
 void write(JMEExporter e)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

location

protected java.net.URL location

flipped

protected boolean flipped

code

protected int code

format

protected Image.Format format

fileType

protected java.lang.String fileType
Constructor Detail

TextureKey

public TextureKey()

TextureKey

public TextureKey(java.net.URL location,
                  boolean flipped,
                  Image.Format imageType)
Method Detail

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

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

resetHashCode

public void resetHashCode()

write

public void write(JMEExporter e)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JMEImporter e)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException

getFormat

public Image.Format getFormat()

setFormat

public void setFormat(Image.Format format)

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface Savable

isFlipped

public boolean isFlipped()
Returns:
Returns the flipped.

setFlipped

public void setFlipped(boolean flipped)
Parameters:
flipped - The flipped to set.

getLocation

public java.net.URL getLocation()
Returns:
Returns the location.

setLocation

public void setLocation(java.net.URL location)
Parameters:
location - The location to set.

getFileType

public java.lang.String getFileType()

setFileType

public void setFileType(java.lang.String fileType)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object