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


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

Store Suppliers in a map

X-Received by 2002:ac8:1911:: with SMTP id t17mr5182926qtj.22.1554872478209; Tue, 09 Apr 2019 22:01:18 -0700 (PDT)
X-Received by 2002:a25:d289:: with SMTP id j131mr26184236ybg.289.1554872478027; Tue, 09 Apr 2019 22:01:18 -0700 (PDT)
Path csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!t9no761556qtn.0!news-out.google.com!i8ni276qtr.1!nntp.google.com!t9no761550qtn.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Tue, 9 Apr 2019 22:01:17 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=192.176.1.84; posting-account=1c_fOgoAAADuOXlL0A4-T9PUmVHtMSYd
NNTP-Posting-Host 192.176.1.84
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <88a3b286-0d96-425e-ac82-c02e3ebcc84a@googlegroups.com> (permalink)
Subject Store Suppliers in a map
From mike <mikaelpetterson@hotmail.com>
Injection-Date Wed, 10 Apr 2019 05:01:18 +0000
Content-Type text/plain; charset="UTF-8"
Lines 16
Xref csiph.com comp.lang.java.programmer:38886

Show key headers only | 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