Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #38886

Store Suppliers in a map

Newsgroups comp.lang.java.programmer
Date 2019-04-09 22:01 -0700
Message-ID <88a3b286-0d96-425e-ac82-c02e3ebcc84a@googlegroups.com> (permalink)
Subject Store Suppliers in a map
From mike <mikaelpetterson@hotmail.com>

Show all headers | View raw


Hi,

I need to to different suppliers:

- Supplier<String>
- Supplier<Integer>
- Supplier<List<String>>

Map<String, Supplier> map= new HashMap<>();

How can I define a map ( some similar collection ) to store these different suppliers in? 

When I get it from map what will be the type?

br,

//mike

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Store Suppliers in a map mike <mikaelpetterson@hotmail.com> - 2019-04-09 22:01 -0700
  Re: Store Suppliers in a map mike <mikaelpetterson@hotmail.com> - 2019-04-09 22:04 -0700
  Re: Store Suppliers in a map Patrick Roemer <sangamon@netcologne.de> - 2019-04-10 16:12 +0200
    Re: Store Suppliers in a map Patrick Roemer <sangamon@netcologne.de> - 2019-04-10 16:35 +0200
  Re: Store Suppliers in a map Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2019-04-10 19:07 +0200

csiph-web