Record Class Args.shieldsArg
java.lang.Object
java.lang.Record
za.co.wethinkcode.robots.shared.arguments.Args.shieldsArg
- Record Components:
shields- how many shields the robot has
- Enclosing class:
Args
Record class to store the shields argument for launch
-
Constructor Summary
ConstructorsConstructorDescriptionshieldsArg(Integer shields) Creates an instance of ashieldsArgrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getValue()Get the value of @paramfinal inthashCode()Returns a hash code value for this object.shields()Returns the value of theshieldsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
shieldsArg
Creates an instance of ashieldsArgrecord class.- Parameters:
shields- the value for theshieldsrecord component
-
-
Method Details
-
getValue
Description copied from interface:ArgumentGet the value of @param -
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). -
shields
Returns the value of theshieldsrecord component.- Returns:
- the value of the
shieldsrecord component
-