Package megamek.common.equipment
Record Class NarcPod
java.lang.Object
java.lang.Record
megamek.common.equipment.NarcPod
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNarcPod(int team, int location) Creates an instance of aNarcPodrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.intintgetTeam()final inthashCode()Returns a hash code value for this object.intlocation()Returns the value of thelocationrecord component.intteam()Returns the value of theteamrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NarcPod
public NarcPod(int team, int location) Creates an instance of aNarcPodrecord class.- Parameters:
team- the value for theteamrecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
getLocation
public int getLocation() -
getTeam
public int getTeam() -
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 with '=='. -
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. -
team
public int team()Returns the value of theteamrecord component.- Returns:
- the value of the
teamrecord component
-
location
public int location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-