Class RandomVector2fProperty
java.lang.Object
dev.prozilla.pine.common.property.random.RandomProperty<Vector2f>
dev.prozilla.pine.common.property.random.RandomObjectProperty<Vector2f>
dev.prozilla.pine.common.property.random.RandomVector2fProperty
- All Implemented Interfaces:
Property<Vector2f>,Vector2fProperty,Vector2fPropertyBase<Vector2f>,Transmittable<Vector2f>,Functor<Vector2f>
public class RandomVector2fProperty
extends RandomObjectProperty<Vector2f>
implements Vector2fProperty
-
Field Summary
Fields inherited from class dev.prozilla.pine.common.property.random.RandomObjectProperty
max, minFields inherited from class dev.prozilla.pine.common.property.random.RandomProperty
globalRandom -
Constructor Summary
ConstructorsConstructorDescriptionRandomVector2fProperty(float min, float max) RandomVector2fProperty(float minX, float maxX, float minY, float maxY) RandomVector2fProperty(Vector2f min, Vector2f max) -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the value of this property.floatgetX()Returns the x value of the current vector, or0if the vector isnull.floatgetY()Returns the y value of the current vector, or0if the vector isnull.booleanChecks if the value of this property is notnull.Returns a boolean property whose value istrueif the value of this property is notnulland vice versa.Methods inherited from class dev.prozilla.pine.common.property.random.RandomProperty
getRandom, setGlobalSeed, setSeedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.prozilla.pine.common.property.Property
getValueOr, hasValue, hasValueProperty, isNull, map, replaceNull, requireValue, snapshot, toStringPropertyMethods inherited from interface dev.prozilla.pine.common.property.vector.Vector2fProperty
transmitMethods inherited from interface dev.prozilla.pine.common.property.vector.Vector2fPropertyBase
xProperty, yProperty
-
Constructor Details
-
RandomVector2fProperty
public RandomVector2fProperty(float min, float max) -
RandomVector2fProperty
public RandomVector2fProperty(float minX, float maxX, float minY, float maxY) -
RandomVector2fProperty
-
-
Method Details
-
isNotNull
@Contract("-> true") public boolean isNotNull()Description copied from interface:PropertyChecks if the value of this property is notnull. -
isNotNullProperty
Description copied from interface:PropertyReturns a boolean property whose value istrueif the value of this property is notnulland vice versa.- Specified by:
isNotNullPropertyin interfaceProperty<Vector2f>- Returns:
- A boolean property whose value is
trueif the value of this property is notnulland vice versa. - See Also:
-
getValue
Description copied from interface:PropertyReturns the value of this property. -
getX
public float getX()Description copied from interface:Vector2fPropertyBaseReturns the x value of the current vector, or0if the vector isnull.- Specified by:
getXin interfaceVector2fProperty- Specified by:
getXin interfaceVector2fPropertyBase<Vector2f>- Returns:
- The x value of the current vector.
-
getY
public float getY()Description copied from interface:Vector2fPropertyBaseReturns the y value of the current vector, or0if the vector isnull.- Specified by:
getYin interfaceVector2fProperty- Specified by:
getYin interfaceVector2fPropertyBase<Vector2f>- Returns:
- The y value of the current vector.
-