Class PunishmentList
- java.lang.Object
-
- net.lapismc.lapisbans.api.punishments.core.PunishmentList
-
public class PunishmentList extends java.lang.ObjectA class for storing a list ofPunishmentInterface's. This is required because of the way the API is structured There is no need for the user of this API to use this class, it is simply used to make converting a list of punishments to a list ofPunishmentInterface's easier
-
-
Constructor Summary
Constructors Constructor Description PunishmentList()Setup the list
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(PunishmentInterface punishment)Add aPunishmentInterfaceto the listvoidaddAll(java.util.Collection<PunishmentInterface> punishments)Add multiple vales at oncePunishmentInterfaceget(java.lang.Integer index)Get the punishment at any indexjava.util.List<PunishmentInterface>getAsList()Get thePunishmentInterface's currently stored as aListvoidremove(PunishmentInterface punishment)Remove aPunishmentInterfacefrom the listjava.lang.Integersize()Get the number of items currently in the list
-
-
-
Method Detail
-
size
public java.lang.Integer size()
Get the number of items currently in the list- Returns:
- Returns the number of Punishments stored
-
get
public PunishmentInterface get(java.lang.Integer index)
Get the punishment at any index- Parameters:
index- The index you wish to fetch- Returns:
- Returns the
PunishmentInterfaceat the index provided
-
add
public void add(PunishmentInterface punishment)
Add aPunishmentInterfaceto the list- Parameters:
punishment- The punishment you wish to add
-
addAll
public void addAll(java.util.Collection<PunishmentInterface> punishments)
Add multiple vales at once- Parameters:
punishments- The collection ofPunishmentInterface's you wish to add
-
remove
public void remove(PunishmentInterface punishment)
Remove aPunishmentInterfacefrom the list- Parameters:
punishment- the punishment you wish to remove
-
getAsList
public java.util.List<PunishmentInterface> getAsList()
Get thePunishmentInterface's currently stored as aList- Returns:
- Returns a list of the currently stored punishments
-
-