Package com.booksaw.betterTeams.team
Class SetTeamComponent<T>
java.lang.Object
com.booksaw.betterTeams.team.SetTeamComponent<T>
- All Implemented Interfaces:
TeamComponent<Set<T>>
- Direct Known Subclasses:
LocationSetComponent,TeamPlayerSetComponent,UuidSetComponent,WarpSetComponent
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidUsed to add a component to this component listvoidclear()Clears all values from the list.booleanUsed to check if the component provided is stored within this componentabstract TfromString(String str) Used to convert a string into the correct component for this typeget()getClone()Used to get a clone of the stored list, this can be used to avoid concurrent modificationabstract StringbooleanisEmpty()voidvoidUsed to remove a component from this component listvoidintsize()abstract StringUsed to convert a component of the list to a string for savingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.booksaw.betterTeams.team.TeamComponent
load, save
-
Field Details
-
set
-
-
Constructor Details
-
SetTeamComponent
protected SetTeamComponent()
-
-
Method Details
-
get
- Specified by:
getin interfaceTeamComponent<T>- Returns:
- The stored value
-
getClone
Used to get a clone of the stored list, this can be used to avoid concurrent modification- Returns:
- A clone of the stored list
-
set
- Specified by:
setin interfaceTeamComponent<T>- Parameters:
newSet- Set what the currently stored value is
-
size
public int size()- Returns:
- The number of members stored within the list
-
isEmpty
public boolean isEmpty()- Returns:
- If the list is empty
-
load
-
getConvertedList
-
add
Used to add a component to this component list- Parameters:
team- the player's teamcomponent- The component to add
-
remove
Used to remove a component from this component list- Parameters:
team- The playe's teamcomponent- The component to remove
-
contains
Used to check if the component provided is stored within this component- Parameters:
component- The component to check- Returns:
- If the component is within this component list
-
clear
public void clear()Clears all values from the list. -
getSectionHeading
- Returns:
- The reference within the team storage where the data is stored
-
fromString
Used to convert a string into the correct component for this type- Parameters:
str- The string to convert- Returns:
- The value to be added to the list
-
toString
Used to convert a component of the list to a string for saving- Parameters:
component- The component to convert- Returns:
- The converted component
-