[ 
https://issues.apache.org/jira/browse/COLLECTIONS-876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory updated COLLECTIONS-876:
----------------------------------------
    Summary: Use LazyMap without deprecated classes  (was: use LazyMap without 
deprecated classes)

> Use LazyMap without deprecated classes
> --------------------------------------
>
>                 Key: COLLECTIONS-876
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-876
>             Project: Commons Collections
>          Issue Type: Improvement
>    Affects Versions: 4.5.0
>            Reporter: Jim Sellers
>            Priority: Minor
>             Fix For: 5.0.0
>
>
> The example from LazyMap uses the collections4 deprecated Factory, which is a 
> subclass of java.util.function.Supplier
> {code}
> Factory<Date> factory = new Factory<Date>() {
>     @Override
>     public Date create() {
>         return new Date();
>     }
> };
> Map<String, Date> lazy = LazyMap.lazyMap(new HashMap<String, Date>(), 
> factory);
> Date date = lazy.get("NOW");
> {code}
> Places where org.apache.commons.collections4.Factory is used should be 
> switched to Supplier.
> I only have the LazyMap, but I'm sure many of the Lazy* methods would be 
> similar.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to