-
Notifications
You must be signed in to change notification settings - Fork 10
StringList
youyihj edited this page Aug 31, 2022
·
3 revisions
StringList is like List<String>
, but a little different.
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
import mods.zenutils.StringList;
StringList.create(Collection<?> list)
StringList.create(Object[] objects)
StringList.empty()
StringList.singletonList(Object object)
- String get(int index)
- String set(int index, Object obj) -> returns the old element in the index
- boolean add(Object obj)
- boolean remove(Object obj)
- boolean contains(Object obj)
- boolean add(String s)
- boolean remove(String s)
- contains(String s)
- void clear()
- boolean removeIf(StringPredicate filter) -> removes all of the strings that match the given predicate. Returns true if any strings were removed.
You can interate it. Such as ...
import mods.zenutils.StringList;
val l as StringList = StringList.empty();
l.add("41");
l.add(6);
l.add(<ore:ingotIron>);
for s in l {
print(s);
}
- GlobalFunctions
- ScriptReloading
- SuppressErrorPreprocessor
- HardFailPreprocessor
- OrderlyMap
- IData Deep Update
- Template String
- Native Method Access
- Mixin
- CrTI18n
- CrTUUID
- CrTItemHandler
- CrTLiquidHandler
- ILiquidTankProperties
- StringList
- HexHelper
- StaticString
- Catenation
- PersistedCatenation
- PlayerStat
- IStatFormatter
- GameRuleHelper
- ZenCommand
- ZenCommandTree
- ZenUtilsCommandSender
- IGetCommandUsage
- ICommandExecute
- IGetTabCompletion
- CommandUtils