Package com.elo.gradle.osgi.utils
Record Class VariableReplacer.VariableExpression
java.lang.Object
java.lang.Record
com.elo.gradle.osgi.utils.VariableReplacer.VariableExpression
- Enclosing class:
VariableReplacer
public static record VariableReplacer.VariableExpression(String expression, String variable, String defaultValue, String func)
extends Record
Represents a variable expression in the format ${variable:defaultValue~>func}
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVariableExpression(String expression, String variable, String defaultValue, String func) Creates an instance of aVariableExpressionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpressionrecord component.func()Returns the value of thefuncrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.variable()Returns the value of thevariablerecord component.
-
Field Details
-
VARIABLE_REGEX
-
-
Constructor Details
-
VariableExpression
Creates an instance of aVariableExpressionrecord class.- Parameters:
expression- the value for theexpressionrecord componentvariable- the value for thevariablerecord componentdefaultValue- the value for thedefaultValuerecord componentfunc- the value for thefuncrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
expression
Returns the value of theexpressionrecord component.- Returns:
- the value of the
expressionrecord component
-
variable
Returns the value of thevariablerecord component.- Returns:
- the value of the
variablerecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
func
Returns the value of thefuncrecord component.- Returns:
- the value of the
funcrecord component
-