java.lang.Object
java.lang.Record
dev.qilletni.api.lang.types.collection.CollectionLimit
- Record Components:
limitCount- The numerical part of the limitlimitUnit- The unit of the limit
A backing type for the
limit type on a collection, e.g. limit[5] or limit[3h].
This defines how much of a collection should be played.-
Constructor Summary
ConstructorsConstructorDescriptionCollectionLimit(int limitCount, CollectionLimitUnit limitUnit) Creates an instance of aCollectionLimitrecord 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 thelimitCountrecord component.Returns the value of thelimitUnitrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
CollectionLimit
Creates an instance of aCollectionLimitrecord class.- Parameters:
limitCount- the value for thelimitCountrecord componentlimitUnit- the value for thelimitUnitrecord 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 '=='. -
limitCount
public int limitCount()Returns the value of thelimitCountrecord component.- Returns:
- the value of the
limitCountrecord component
-
limitUnit
-