Class FixedIntProperty
java.lang.Object
dev.prozilla.pine.common.property.fixed.FixedIntProperty
- All Implemented Interfaces:
FixedProperty<Integer>,IntProperty,NonNullProperty<Integer>,Property<Integer>,Functor<Integer>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intget()Returns the primitive value of this property.hasProperty(int value) Returns a boolean property whose value istrueif the value of this property is equal tovalue.Returns a boolean property whose value is alwaystrue.Returns a boolean property whose value istrueif the value of this property is0.replaceNull(Integer defaultValue) Returns this property, whose value is nevernull.snapshot()Returns a fixed property whose value is the current value of this property, at the time of calling this method.Methods 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.fixed.FixedProperty
hasValueProperty, map, toStringPropertyMethods inherited from interface dev.prozilla.pine.common.property.IntProperty
getValue, getValueOr, has, map, requireValueMethods inherited from interface dev.prozilla.pine.common.property.NonNullProperty
isNotNull
-
Field Details
-
value
protected final int value
-
-
Constructor Details
-
FixedIntProperty
public FixedIntProperty(int value)
-
-
Method Details
-
get
public final int get()Description copied from interface:IntPropertyReturns the primitive value of this property.- Specified by:
getin interfaceIntProperty- Returns:
- The primitive value of this property.
-
isNotNullProperty
Description copied from interface:NonNullPropertyReturns a boolean property whose value is alwaystrue.- Specified by:
isNotNullPropertyin interfaceFixedProperty<Integer>- Specified by:
isNotNullPropertyin interfaceNonNullProperty<Integer>- Specified by:
isNotNullPropertyin interfaceProperty<Integer>- Returns:
BooleanProperty.TRUE- See Also:
-
snapshot
Description copied from interface:PropertyReturns a fixed property whose value is the current value of this property, at the time of calling this method. -
isZeroProperty
Description copied from interface:IntPropertyReturns a boolean property whose value istrueif the value of this property is0.- Specified by:
isZeroPropertyin interfaceIntProperty- Returns:
- A boolean property based on whether the value of this property is
0. - See Also:
-
replaceNull
Description copied from interface:NonNullPropertyReturns this property, whose value is nevernull.- Specified by:
replaceNullin interfaceFixedProperty<Integer>- Specified by:
replaceNullin interfaceIntProperty- Specified by:
replaceNullin interfaceNonNullProperty<Integer>- Specified by:
replaceNullin interfaceProperty<Integer>- Returns:
- This property.
-
hasProperty
Description copied from interface:IntPropertyReturns a boolean property whose value istrueif the value of this property is equal tovalue.- Specified by:
hasPropertyin interfaceIntProperty- Returns:
- A boolean property whose value is
trueif the value of this property is equal tovalue. - See Also:
-