Class AbstractComponent

    • Field Detail

      • children

        protected final List<Component> children
        The list of children.
      • style

        protected final Style style
        The style of this component.
    • Constructor Detail

      • AbstractComponent

        protected AbstractComponent​(@NonNull List<? extends ComponentLike> children,
                                    @NonNull Style style)
    • Method Detail

      • children

        public final @NonNull List<Component> children()
        Description copied from interface: Component
        Gets the unmodifiable list of children.
        Specified by:
        children in interface Component
        Returns:
        the unmodifiable list of children
      • style

        public final @NonNull Style style()
        Description copied from interface: Component
        Gets the style of this component.
        Specified by:
        style in interface Component
        Returns:
        the style of this component
      • replaceText

        public @NonNull Component replaceText​(@NonNull TextReplacementConfig config)
        Description copied from interface: Component
        Finds and replaces any text with this or child Components using the provided options.
        Specified by:
        replaceText in interface Component
        Parameters:
        config - the replacement config
        Returns:
        a modified copy of this component
      • equals

        public boolean equals​(@Nullable Object other)
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • examinableProperties

        public @NonNull Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
        Specified by:
        examinableProperties in interface net.kyori.examination.Examinable