Class PVector4L<T>
java.lang.Object
com.io7m.jtensors.core.parameterized.vectors.PVector4L<T>
- Type Parameters:
T- A phantom type parameter
- All Implemented Interfaces:
PVector4LType<T>, PVectorReadable2LType<T>, PVectorReadable3LType<T>, PVectorReadable4LType<T>, VectorReadable2LType, VectorReadable3LType, VectorReadable4LType, VectorComputationalType
The type of 4D
long-typed vectors.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> PVector4L.Builder<T> builder()Creates a builder forPVector4L.static <T> PVector4L<T> copyOf(PVector4LType<T> instance) Creates an immutable copy of aPVector4LTypevalue.booleanThis instance is equal to all instances ofPVector4Lthat have equal attribute values.inthashCode()Computes a hash code from attributes:x,y,z,w.static <T> PVector4L<T> of(long x, long y, long z, long w) Construct a new immutablePVector4Linstance.toString()Prints the immutable valuePVector4Lwith attribute values.longw()withW(long value) Copy the current immutable object by setting a value for thewattribute.withX(long value) Copy the current immutable object by setting a value for thexattribute.withY(long value) Copy the current immutable object by setting a value for theyattribute.withZ(long value) Copy the current immutable object by setting a value for thezattribute.longx()longy()longz()
-
Method Details
-
x
public long x()- Specified by:
xin interfacePVector4LType<T>- Specified by:
xin interfaceVectorReadable2LType- Returns:
- The value of the
xattribute
-
y
public long y()- Specified by:
yin interfacePVector4LType<T>- Specified by:
yin interfaceVectorReadable2LType- Returns:
- The value of the
yattribute
-
z
public long z()- Specified by:
zin interfacePVector4LType<T>- Specified by:
zin interfaceVectorReadable3LType- Returns:
- The value of the
zattribute
-
w
public long w()- Specified by:
win interfacePVector4LType<T>- Specified by:
win interfaceVectorReadable4LType- Returns:
- The value of the
wattribute
-
withX
-
withY
-
withZ
-
withW
-
equals
-
hashCode
-
toString
-
of
Construct a new immutablePVector4Linstance.- Type Parameters:
T- generic parameter T- Parameters:
x- The value for thexattributey- The value for theyattributez- The value for thezattributew- The value for thewattribute- Returns:
- An immutable PVector4L instance
-
copyOf
Creates an immutable copy of aPVector4LTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T- generic parameter T- Parameters:
instance- The instance to copy- Returns:
- A copied immutable PVector4L instance
-
builder
-