Interface Pointered

    • Method Detail

      • get

        @NotNull
        default <T> @NotNull Optional<T> get​(@NotNull
                                             @NotNull Pointer<T> pointer)
        Gets the value of pointer.
        Type Parameters:
        T - the type
        Parameters:
        pointer - the pointer
        Returns:
        the value
        Since:
        4.8.0
      • getOrDefault

        @Contract("_, null -> null; _, !null -> !null")
        @Nullable
        default <T> T getOrDefault​(@NotNull
                                   @NotNull Pointer<T> pointer,
                                   @Nullable
                                   T defaultValue)
        Gets the value of pointer.

        If this Audience is unable to provide a value for pointer, defaultValue will be returned.

        Type Parameters:
        T - the type
        Parameters:
        pointer - the pointer
        defaultValue - the default value
        Returns:
        the value
        Since:
        4.8.0
      • getOrDefaultFrom

        default <T> @UnknownNullability T getOrDefaultFrom​(@NotNull
                                                           @NotNull Pointer<T> pointer,
                                                           @NotNull
                                                           @NotNull Supplier<? extends T> defaultValue)
        Gets the value of pointer.

        If this Audience is unable to provide a value for pointer, the value supplied by defaultValue will be returned.

        Type Parameters:
        T - the type
        Parameters:
        pointer - the pointer
        defaultValue - the default value supplier
        Returns:
        the value
        Since:
        4.8.0
      • pointers

        @NotNull
        default @NotNull Pointers pointers()
        Gets the pointers for this object.
        Returns:
        the pointers
        Since:
        4.8.0