public class TreasureListTreasureObj extends TreasureObj
TreasureObj
representing a "treasure" entry.UNSET
Constructor and Description |
---|
TreasureListTreasureObj(java.lang.String name,
TreasureListTreasureObjType listType)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
appendToString(java.lang.StringBuilder sb)
Appends a description of this treasure object to a
StringBuilder . |
void |
copyListType(TreasureObj treasureObj)
Copes the list type of a treasureone list.
|
TreasureListTreasureObjType |
getListType()
Returns the list type.
|
void |
setListType(TreasureListTreasureObjType listType)
Sets the list type.
|
void |
visit(TreasureObjVisitor visitor)
Calls the
TreasureObjVisitor callback function appropriate for
this instance. |
correctChance, getChance, getMagic, getName, hasLoop, initChance, isRealChild, isTreasureList, setChance, setHasLoop, setMagic, setNrof, toString
public TreasureListTreasureObj(@NotNull java.lang.String name, @NotNull TreasureListTreasureObjType listType)
name
- name of this treasure objectlistType
- the list type@NotNull public TreasureListTreasureObjType getListType()
public void setListType(@NotNull TreasureListTreasureObjType listType)
listType
- the list typeprotected void appendToString(@NotNull java.lang.StringBuilder sb)
StringBuilder
.appendToString
in class TreasureObj
sb
- the string builderpublic void visit(@NotNull TreasureObjVisitor visitor)
TreasureObjVisitor
callback function appropriate for
this instance.visit
in class TreasureObj
visitor
- the visitor to callpublic void copyListType(@NotNull TreasureObj treasureObj)
copyListType
in class TreasureObj
treasureObj
- the node to copy from