Class TagList
java.lang.Object
com.saicone.rtag.tag.TagList
Class to invoke ListTag methods across versions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdd tag object.static voidAdd multiple tag objects.static voidClear a ListTag and reset list type.static ObjectCopy provided ListTag into new one.static Objectclone(Object tag, BiPredicate<Object, Integer> filter) Copy provided ListTag into new one using a list filter.static booleanCheck if current ListTag value contains Tag object.static ObjectGet tag object from index.static byteDeprecated.getValue(RtagMirror mirror, Object tag) Get current tag list with values converted.Get current tag list.static booleanCheck if the provided object is instance of ListTag class.static ObjectnewTag()Constructs an empty ListTag.static <T> ObjectnewTag(RtagMirror mirror, List<T> list) Constructs an ListTag with provided List of any type and requiredRtagMirrorto convert Objects.static <T> ObjectConstructs an ListTag with provided List of tags.static <T> ObjectnewUncheckedTag(List<T> list) Constructs an ListTag with provided List of tags.
This method doesn't provide any safe check and assumes that the provided list is completely usable to create a new ListTag.static ObjectRemove tag object.static voidSet tag object at index.static voidDeprecated.static voidOverride the current Tag list inside ListTag.static intGet the size of elements inside list.
-
Method Details
-
newTag
-
newTag
-
newUncheckedTag
Constructs an ListTag with provided List of tags.
This method doesn't provide any safe check and assumes that the provided list is completely usable to create a new ListTag.- Type Parameters:
T- List type parameter.- Parameters:
list- List with Tag values.- Returns:
- New ListTag instance.
-
newTag
Constructs an ListTag with provided List of any type and requiredRtagMirrorto convert Objects.- Type Parameters:
T- List type parameter.- Parameters:
mirror- RtagMirror to convert objects into tags.list- List with objects.- Returns:
- New ListTag instance.
-
isTagList
Check if the provided object is instance of ListTag class.- Parameters:
object- the object to check.- Returns:
- true if the object is an instance of ListTag class.
-
clone
-
clone
Copy provided ListTag into new one using a list filter.- Parameters:
tag- ListTag instance.filter- Object filter.- Returns:
- A filtered copy of original ListTag.
-
getValue
-
getValue
Get current tag list with values converted.- Parameters:
mirror- RtagMirror to convert tags.tag- ListTag instance.- Returns:
- A list of objects.
- See Also:
-
getType
Deprecated.Get current tag type that represent tag list.- Parameters:
tag- ListTag instance.- Returns:
- A Tag object type.
- See Also:
-
size
Get the size of elements inside list.- Parameters:
tag- ListTag instance.- Returns:
- Size of list inside.
-
contains
-
add
-
add
-
remove
-
set
-
setType
Deprecated.Change the current Tag type inside ListTag.- Parameters:
tag- ListTag instance.type- Tag object type.- See Also:
-
setValue
-
get
-
clear
Clear a ListTag and reset list type.- Parameters:
tag- ListTag instance.
-