T
- A phantom type parameterPVector2DType<T>
, PVectorReadable2DType<T>
, VectorReadable2DType
, VectorComputationalType
public final class PVector2D<T> extends Object implements PVector2DType<T>
double
-typed vectors.Modifier and Type | Class | Description |
---|---|---|
static class |
PVector2D.Builder<T> |
Builds instances of type
PVector2D . |
Modifier and Type | Method | Description |
---|---|---|
static <T> PVector2D.Builder<T> |
builder() |
Creates a builder for
PVector2D . |
boolean |
equals(Object another) |
This instance is equal to all instances of
PVector2D that have equal attribute values. |
int |
hashCode() |
Computes a hash code from attributes:
x , y . |
static <T> PVector2D<T> |
of(double x,
double y) |
Construct a new immutable
PVector2D instance. |
String |
toString() |
Prints the immutable value
PVector2D with attribute values. |
double |
x() |
|
double |
y() |
public double x()
x
in interface PVector2DType<T>
x
in interface VectorReadable2DType
x
attributepublic double y()
y
in interface PVector2DType<T>
y
in interface VectorReadable2DType
y
attributepublic boolean equals(Object another)
PVector2D
that have equal attribute values.public int hashCode()
x
, y
.public String toString()
PVector2D
with attribute values.public static <T> PVector2D<T> of(double x, double y)
PVector2D
instance.x
- The value for the x
attributey
- The value for the y
attributepublic static <T> PVector2D.Builder<T> builder()
PVector2D
.T
- generic parameter TCopyright © 2017 <code@io7m.com> http://io7m.com