Record Class AllowedCharRange
java.lang.Object
java.lang.Record
eu.cloudnetservice.ext.platforminject.processor.id.AllowedCharRange
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theallowedCharRangesrecord component.private final intThe field for thelowerBoundrecord component.private final charThe field for thereplacementCharrecord component.private final intThe field for theupperBoundrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAllowedCharRange(@NonNull CharRange[] allowedCharRanges, int lowerBound, int upperBound, char replacementChar) Creates an instance of aAllowedCharRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedCharRangesrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanhandledByRange(int index) final inthashCode()Returns a hash code value for this object.intReturns the value of thelowerBoundrecord component.charreplaceCharIfOutOfBounds(char characterAtIndex) private charreplaceCharIfOutOfBounds(char characterAtIndex, boolean tryLowerCase) charReturns the value of thereplacementCharrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theupperBoundrecord component.
-
Field Details
-
allowedCharRanges
-
lowerBound
private final int lowerBoundThe field for thelowerBoundrecord component. -
upperBound
private final int upperBoundThe field for theupperBoundrecord component. -
replacementChar
private final char replacementCharThe field for thereplacementCharrecord component.
-
-
Constructor Details
-
AllowedCharRange
AllowedCharRange(@NonNull @NonNull CharRange[] allowedCharRanges, int lowerBound, int upperBound, char replacementChar) Creates an instance of aAllowedCharRangerecord class.- Parameters:
allowedCharRanges- the value for theallowedCharRangesrecord componentlowerBound- the value for thelowerBoundrecord componentupperBound- the value for theupperBoundrecord componentreplacementChar- the value for thereplacementCharrecord component
-
-
Method Details
-
handledByRange
public boolean handledByRange(int index) -
replaceCharIfOutOfBounds
public char replaceCharIfOutOfBounds(char characterAtIndex) -
replaceCharIfOutOfBounds
private char replaceCharIfOutOfBounds(char characterAtIndex, boolean tryLowerCase) -
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. -
allowedCharRanges
-
lowerBound
public int lowerBound()Returns the value of thelowerBoundrecord component.- Returns:
- the value of the
lowerBoundrecord component
-
upperBound
public int upperBound()Returns the value of theupperBoundrecord component.- Returns:
- the value of the
upperBoundrecord component
-
replacementChar
public char replacementChar()Returns the value of thereplacementCharrecord component.- Returns:
- the value of the
replacementCharrecord component
-