Record Class ConstantExpressions.ConstantExpression.Literal
java.lang.Object
java.lang.Record
com.google.errorprone.bugpatterns.threadsafety.ConstantExpressions.ConstantExpression.Literal
- All Implemented Interfaces:
ConstantExpressions.ConstantExpression
- Enclosing interface:
ConstantExpressions.ConstantExpression
public static record ConstantExpressions.ConstantExpression.Literal(Object object)
extends Record
implements ConstantExpressions.ConstantExpression
Represents a constant literal.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ConstantExpressions.ConstantExpression
ConstantExpressions.ConstantExpression.ConstantEquals, ConstantExpressions.ConstantExpression.Literal, ConstantExpressions.ConstantExpression.PureMethodInvocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.object()Returns the value of theobjectrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Literal
Creates an instance of aLiteralrecord class.- Parameters:
object- the value for theobjectrecord component
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConstantExpressions.ConstantExpression
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
object
Returns the value of theobjectrecord component.- Returns:
- the value of the
objectrecord component
-