de.javagl.utils.obj.impl
Class DefaultFloatTuple

java.lang.Object
  extended by de.javagl.utils.obj.impl.DefaultFloatTuple
All Implemented Interfaces:
FloatTuple

public class DefaultFloatTuple
extends Object
implements FloatTuple

Default implementation of a FloatTuple


Constructor Summary
DefaultFloatTuple(float x)
          Creates a new DefaultFloatTuple with the given value
DefaultFloatTuple(float x, float y)
          Creates a new DefaultFloatTuple with the given values
DefaultFloatTuple(float x, float y, float z)
          Creates a new DefaultFloatTuple with the given values
DefaultFloatTuple(float x, float y, float z, float w)
          Creates a new DefaultFloatTuple with the given values
DefaultFloatTuple(float x, float y, float z, float w, int dimensions)
          Creates a new DefaultFloatTuple with the given values
DefaultFloatTuple(FloatTuple other)
          Copy constructor.
 
Method Summary
 boolean equals(Object obj)
           
 float get(int index)
          Return the specified component of this tuple
 int getDimensions()
          Return the dimensions of this tuple
 float getW()
          Return the w-component of this tuple
 float getX()
          Return the x-component of this tuple
 float getY()
          Return the y-component of this tuple
 float getZ()
          Return the z-component of this tuple
 int hashCode()
           
 void setW(float w)
          Set the given component of this tuple
 void setX(float x)
          Set the given component of this tuple
 void setY(float y)
          Set the given component of this tuple
 void setZ(float z)
          Set the given component of this tuple
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultFloatTuple

public DefaultFloatTuple(float x,
                         float y,
                         float z,
                         float w,
                         int dimensions)
Creates a new DefaultFloatTuple with the given values

Parameters:
x - The x value
y - The y value
z - The z value
w - The w value
dimensions - The dimensions

DefaultFloatTuple

public DefaultFloatTuple(float x,
                         float y,
                         float z,
                         float w)
Creates a new DefaultFloatTuple with the given values

Parameters:
x - The x value
y - The y value
z - The z value
w - The w value

DefaultFloatTuple

public DefaultFloatTuple(float x,
                         float y,
                         float z)
Creates a new DefaultFloatTuple with the given values

Parameters:
x - The x value
y - The y value
z - The z value

DefaultFloatTuple

public DefaultFloatTuple(float x,
                         float y)
Creates a new DefaultFloatTuple with the given values

Parameters:
x - The x value
y - The y value

DefaultFloatTuple

public DefaultFloatTuple(float x)
Creates a new DefaultFloatTuple with the given value

Parameters:
x - The x value

DefaultFloatTuple

public DefaultFloatTuple(FloatTuple other)
Copy constructor.

Parameters:
other - The other FloatTuple
Method Detail

get

public float get(int index)
Description copied from interface: FloatTuple
Return the specified component of this tuple

Specified by:
get in interface FloatTuple
Parameters:
index - The index of the component
Returns:
The specified component of this tuple

getX

public float getX()
Description copied from interface: FloatTuple
Return the x-component of this tuple

Specified by:
getX in interface FloatTuple
Returns:
The x-component of this tuple

setX

public void setX(float x)
Set the given component of this tuple

Parameters:
x - The component to set

getY

public float getY()
Description copied from interface: FloatTuple
Return the y-component of this tuple

Specified by:
getY in interface FloatTuple
Returns:
The y-component of this tuple

setY

public void setY(float y)
Set the given component of this tuple

Parameters:
y - The component to set

getZ

public float getZ()
Description copied from interface: FloatTuple
Return the z-component of this tuple

Specified by:
getZ in interface FloatTuple
Returns:
The z-component of this tuple

setZ

public void setZ(float z)
Set the given component of this tuple

Parameters:
z - The component to set

getW

public float getW()
Description copied from interface: FloatTuple
Return the w-component of this tuple

Specified by:
getW in interface FloatTuple
Returns:
The w-component of this tuple

setW

public void setW(float w)
Set the given component of this tuple

Parameters:
w - The component to set

getDimensions

public int getDimensions()
Description copied from interface: FloatTuple
Return the dimensions of this tuple

Specified by:
getDimensions in interface FloatTuple
Returns:
The dimensions of this tuple

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object