RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.WellOfGoodwill.Contributor Class Reference
Inheritance diagram for com.runehive.content.WellOfGoodwill.Contributor:
Collaboration diagram for com.runehive.content.WellOfGoodwill.Contributor:

Public Member Functions

void add (int amount)
int compareTo (Contributor other)
boolean equals (Object obj)
int hashCode ()
String toString ()

Public Attributes

int contribution
final String name
final PlayerRight rank

Package Functions

 Contributor (String name, PlayerRight rank, int contribution)

Detailed Description

Definition at line 145 of file WellOfGoodwill.java.

Constructor & Destructor Documentation

◆ Contributor()

com.runehive.content.WellOfGoodwill.Contributor.Contributor ( String name,
PlayerRight rank,
int contribution )
package

Definition at line 150 of file WellOfGoodwill.java.

150 {
151 this.name = name;
152 this.rank = rank;
153 this.contribution = contribution;
154 }

References contribution, name, and rank.

Referenced by compareTo(), and equals().

Here is the caller graph for this function:

Member Function Documentation

◆ add()

void com.runehive.content.WellOfGoodwill.Contributor.add ( int amount)

Definition at line 156 of file WellOfGoodwill.java.

156 {
157 contribution += amount;
158 }

References contribution.

Referenced by com.runehive.content.WellOfGoodwill.add().

Here is the caller graph for this function:

◆ compareTo()

int com.runehive.content.WellOfGoodwill.Contributor.compareTo ( Contributor other)

Definition at line 161 of file WellOfGoodwill.java.

161 {
162 return other.contribution - contribution;
163 }

References contribution, and Contributor().

Here is the call graph for this function:

◆ equals()

boolean com.runehive.content.WellOfGoodwill.Contributor.equals ( Object obj)

Definition at line 171 of file WellOfGoodwill.java.

171 {
172 if (obj == this) return true;
173 if (obj instanceof Contributor) {
174 Contributor other = (Contributor) obj;
175 return name.equals(other.name) && contribution == other.contribution;
176 }
177 return false;
178 }

References contribution, Contributor(), and name.

Here is the call graph for this function:

◆ hashCode()

int com.runehive.content.WellOfGoodwill.Contributor.hashCode ( )

Definition at line 166 of file WellOfGoodwill.java.

166 {
167 return Objects.hash(name, contribution);
168 }

References contribution, and name.

◆ toString()

String com.runehive.content.WellOfGoodwill.Contributor.toString ( )

Definition at line 181 of file WellOfGoodwill.java.

181 {
182 return name + " -- " + contribution;
183 }

References contribution, and name.

Member Data Documentation

◆ contribution

int com.runehive.content.WellOfGoodwill.Contributor.contribution

◆ name

final String com.runehive.content.WellOfGoodwill.Contributor.name

◆ rank

final PlayerRight com.runehive.content.WellOfGoodwill.Contributor.rank

The documentation for this class was generated from the following file: