Skip to content

Commit

Permalink
adding override annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
SJuliez committed Aug 2, 2024
1 parent 7c8330c commit 90f8c41
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions megamek/src/megamek/common/Briefcase.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* You should have received a copy of the GNU General Public License
* along with MegaMek. If not, see <http://www.gnu.org/licenses/>.
*/

package megamek.common;

import java.io.Serializable;
Expand All @@ -25,17 +24,15 @@
* Represents a basic carryable object with no additional other properties
*/
public class Briefcase implements ICarryable, Serializable {
/**
*
*/
private static final long serialVersionUID = 8849879320465375457L;

private double tonnage;
private String name;
private boolean invulnerable;
private int id;
private int ownerId;


@Override
public boolean damage(double amount) {
tonnage -= amount;
return tonnage <= 0;
Expand All @@ -44,11 +41,13 @@ public boolean damage(double amount) {
public void setTonnage(double value) {
tonnage = value;
}


@Override
public double getTonnage() {
return tonnage;
}


@Override
public boolean isInvulnerable() {
return invulnerable;
}
Expand All @@ -60,11 +59,13 @@ public void setInvulnerable(boolean value) {
public void setName(String value) {
name = value;
}


@Override
public String generalName() {
return name;
}


@Override
public String specificName() {
return name + " (" + tonnage + " tons)";
}
Expand Down

0 comments on commit 90f8c41

Please sign in to comment.