Record Class IntProvider.Clamped
java.lang.Object
java.lang.Record
fr.fidorial.world.dimension.IntProvider.Clamped
- Record Components:
minInclusive- the minimum allowed value that the result will bemaxInclusive- the maximum allowed value that the result will besource- the provider being clamped
- All Implemented Interfaces:
IntProvider
- Enclosing interface:
IntProvider
public static record IntProvider.Clamped(int minInclusive, int maxInclusive, IntProvider source)
extends Record
implements IntProvider
- Since:
- 0.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface IntProvider
IntProvider.BiasedToBottom, IntProvider.Clamped, IntProvider.ClampedNormal, IntProvider.Constant, IntProvider.Uniform, IntProvider.WeightedList -
Constructor Summary
ConstructorsConstructorDescriptionClamped(int minInclusive, int maxInclusive, IntProvider source) Creates an instance of aClampedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxInclusiverecord component.intReturns the value of theminInclusiverecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Clamped
Creates an instance of aClampedrecord class.- Parameters:
minInclusive- the value for theminInclusiverecord componentmaxInclusive- the value for themaxInclusiverecord componentsource- the value for thesourcerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
minInclusive
public int minInclusive()Returns the value of theminInclusiverecord component.- Returns:
- the value of the
minInclusiverecord component
-
maxInclusive
public int maxInclusive()Returns the value of themaxInclusiverecord component.- Returns:
- the value of the
maxInclusiverecord component
-
source
-