oop/src/uebung05/logistics/material/BulletBelts.java
2024-05-21 14:18:10 +00:00

39 lines
956 B
Java
Executable File

package logistics.material;
import logistics.quantities.IntUnit;
/**
* The BulletBelts class represents a unit of measurement for 7.62 bullets.
* It is a singleton class, meaning only one instance of the class can exist at a time.
*
* @author Nikolaus Köberlein
* @version 1.0
*/
public class BulletBelts implements IntUnit {
private static BulletBelts INSTANCE;
private BulletBelts() {}
/**
* Get the singleton instance of the BulletBelts class
*
* @return The singleton instance of the BulletBelts class
*/
public static BulletBelts getINSTANCE() {
if (INSTANCE == null) {
INSTANCE = new BulletBelts();
}
return INSTANCE;
}
/**
* Get a string representation of the BulletBelts object
*
* @return A string representation of the BulletBelts object
*/
@Override
public String toString() {
return "belts of 7.62 bullets";
}
}