forked from arianne/stendhal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
/* $Id$ */ | ||
/*************************************************************************** | ||
* (C) Copyright 2003 - Marauroa * | ||
*************************************************************************** | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
package games.stendhal.server.entity.item; | ||
|
||
/** | ||
* this interface tags all items which are stackable. | ||
* | ||
* @author mtotz | ||
* @param <T> | ||
*/ | ||
public interface Stackable<T> { | ||
|
||
/** @return the quantity */ | ||
int getQuantity(); | ||
|
||
/** sets the quantity. | ||
* @param amount to be set*/ | ||
void setQuantity(int amount); | ||
|
||
/** Adds the quantity of the other Stackable to this . | ||
* @param other | ||
* @return the previous quantity */ | ||
int add(T other); | ||
|
||
/** @param other | ||
* @return true when both stackables are of the same type and can be merged */ | ||
boolean isStackable(T other); | ||
|
||
} | ||
/* $Id$ */ | ||
/*************************************************************************** | ||
* (C) Copyright 2003 - Marauroa * | ||
*************************************************************************** | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
package games.stendhal.server.entity.item; | ||
|
||
/** | ||
* this interface tags all items which are stackable. | ||
* | ||
* @author mtotz | ||
* @param <T> | ||
*/ | ||
public interface Stackable<T> { | ||
|
||
/** @return the quantity */ | ||
int getQuantity(); | ||
|
||
/** sets the quantity. | ||
* @param amount to be set*/ | ||
void setQuantity(int amount); | ||
|
||
/** Adds the quantity of the other Stackable to this . | ||
* @param other | ||
* @return the previous quantity */ | ||
int add(T other); | ||
|
||
/** @param other | ||
* @return true when both stackables are of the same type and can be merged */ | ||
boolean isStackable(T other); | ||
|
||
} |