Class AbstractComponent

    • Constructor Detail

      • AbstractComponent

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

      • children

        @NotNull
        public final @NotNull 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

        @NotNull
        public final @NotNull 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

        @NotNull
        public @NotNull Component replaceText​(@NotNull
                                              @NotNull 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
      • compact

        @NotNull
        public @NotNull Component compact()
        Description copied from interface: Component
        Create a new component with any redundant style elements or children removed.
        Specified by:
        compact in interface Component
        Returns:
        the optimized component
      • equals

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

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

        protected Stream<? extends net.kyori.examination.ExaminableProperty> examinablePropertiesWithoutChildren()
      • examinableProperties

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