Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8758
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!b10g2000vbc.googlegroups.com!not-for-mail |
|---|---|
| From | mike <mikaelpetterson@hotmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Substitute value in HashMap at runtime |
| Date | Thu, 13 Oct 2011 05:18:57 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 16 |
| Message-ID | <70a582b4-956b-4145-9cb8-ba8fbaf751f5@b10g2000vbc.googlegroups.com> (permalink) |
| NNTP-Posting-Host | 194.237.142.20 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1318508337 29293 127.0.0.1 (13 Oct 2011 12:18:57 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Thu, 13 Oct 2011 12:18:57 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | b10g2000vbc.googlegroups.com; posting-host=194.237.142.20; posting-account=1c_fOgoAAADuOXlL0A4-T9PUmVHtMSYd |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-Header-Order | HUALESRCNK |
| X-HTTP-UserAgent | Mozilla/5.0 (Windows NT 6.0; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8758 |
Show key headers only | View raw
Hi,
If I create a HashMap with something like:
static Map<String,String> map = new
HashMap<String,String>("variable",MyPreferences.getVariableValue());
If I do it like this I guess that MyPreferences.getVariableValue()
will not be substituted but be the "plain" string.
How can I make my MyPreferences.getVariableValue() be evaluated at
runtime? Any example?
br,
//mike
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar
Substitute value in HashMap at runtime mike <mikaelpetterson@hotmail.com> - 2011-10-13 05:18 -0700
Re: Substitute value in HashMap at runtime Lew <lewbloch@gmail.com> - 2011-10-13 05:53 -0700
Re: Substitute value in HashMap at runtime Robert Klemme <shortcutter@googlemail.com> - 2011-10-13 06:44 -0700
Re: Substitute value in HashMap at runtime Lew <lewbloch@gmail.com> - 2011-10-13 10:12 -0700
Re: Substitute value in HashMap at runtime mike <mikaelpetterson@hotmail.com> - 2011-10-14 06:36 -0700
Re: Substitute value in HashMap at runtime mike <mikaelpetterson@hotmail.com> - 2011-10-14 06:54 -0700
Re: Substitute value in HashMap at runtime markspace <-@.> - 2011-10-14 08:13 -0700
Re: Substitute value in HashMap at runtime Roedy Green <see_website@mindprod.com.invalid> - 2011-10-14 09:40 -0700
csiph-web