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