Skip to content

Suppliers.memoize should return a MemoizingSupplier with isMemoized() #7292

Open
@alexey-pelykh

Description

API(s)

`com.google.common.base.Suppliers::memoize`

How do you want it to be improved?

Get memoizing supplier state without causing memoization

Why do we need it to be improved?

To check the memoizing supplier state without changing it

Example

N/A as there's no such feature

Current Behavior

MemoizingSupplier::initialized is not exposed

Desired Behavior

MemoizingSupplier::initialized is exposed

Concrete Use Cases

e.g. in toString() of a class that needs to print a memoized supplier value without causing the memoization

Checklist

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions