Class TypedComponentReplacerImpl<T extends Component>
java.lang.Object
net.dv8tion.jda.internal.components.replacer.TypedComponentReplacerImpl<T>
- All Implemented Interfaces:
ComponentReplacer
public class TypedComponentReplacerImpl<T extends Component>
extends Object
implements ComponentReplacer
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TypedComponentReplacerImpl
-
-
Method Details
-
apply
Description copied from interface:ComponentReplacer
Attempts to replace or remove the given component.If this method returns the same component and contains children, then this replacer will be applied recursively; otherwise, the component is not replaced.
The returned component must be compatible with the source (a
ActionRow
or aContainer
for example) it originated from.- Specified by:
apply
in interfaceComponentReplacer
- Parameters:
oldComponent
- The component which is attempted to be replaced- Returns:
- A new, compatible component, the same component, or
null
to remove the component.
-