Example usage for java.util LinkedHashMap get

List of usage examples for java.util LinkedHashMap get

Introduction

In this page you can find the example usage for java.util LinkedHashMap get.

Prototype

public V get(Object key) 

Source Link

Document

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

Usage

From source file:com.ultramegasoft.flavordex2.whiskey.WhiskeyEntryFormHelper.java

@Override
public void setExtras(@NonNull LinkedHashMap<String, ExtraFieldHolder> extras) {
    super.setExtras(extras);
    initEditText(mTxtType, extras.get(Tables.Extras.Whiskey.STYLE));
    initEditText(mTxtAge, extras.get(Tables.Extras.Whiskey.STATS_AGE));
    initEditText(mTxtABV, extras.get(Tables.Extras.Whiskey.STATS_ABV));
}

From source file:com.ultramegasoft.flavordex2.wine.WineEntryFormHelper.java

@Override
public void setExtras(@NonNull LinkedHashMap<String, ExtraFieldHolder> extras) {
    super.setExtras(extras);
    initEditText(mTxtVarietal, extras.get(Tables.Extras.Wine.VARIETAL));
    initEditText(mTxtVintage, extras.get(Tables.Extras.Wine.STATS_VINTAGE));
    initEditText(mTxtABV, extras.get(Tables.Extras.Wine.STATS_ABV));
}

From source file:com.ultramegasoft.flavordex2.beer.BeerEntryFormHelper.java

@Override
public void setExtras(@NonNull LinkedHashMap<String, ExtraFieldHolder> extras) {
    super.setExtras(extras);
    initEditText(mTxtStyle, extras.get(Tables.Extras.Beer.STYLE));
    initSpinner(mSpnServing, extras.get(Tables.Extras.Beer.SERVING));
    initEditText(mTxtIBU, extras.get(Tables.Extras.Beer.STATS_IBU));
    initEditText(mTxtABV, extras.get(Tables.Extras.Beer.STATS_ABV));
    initEditText(mTxtOG, extras.get(Tables.Extras.Beer.STATS_OG));
    initEditText(mTxtFG, extras.get(Tables.Extras.Beer.STATS_FG));
}

From source file:net.sf.maltcms.chromaui.project.spi.DBProjectFactory.java

private static void addTreatmentGroups(LinkedHashMap<String, Set<File>> groupToFile,
        LinkedHashMap<File, IChromatogramDescriptor> fileToDescriptor, IChromAUIProject icui) {
    for (String group : groupToFile.keySet()) {
        ITreatmentGroupDescriptor treatmentGroupDescriptor = new TreatmentGroupDescriptor();
        treatmentGroupDescriptor.setName(group);
        treatmentGroupDescriptor.setDisplayName(group);
        TreatmentGroupContainer tgc = new TreatmentGroupContainer();
        tgc.setTreatmentGroup(treatmentGroupDescriptor);
        ISampleGroupDescriptor sgd = new SampleGroupDescriptor();
        sgd.setName(group);/*from  w ww.  j ava2  s .c  o  m*/
        sgd.setDisplayName(group);
        Set<File> files = groupToFile.get(group);
        for (File f : files) {
            IChromatogramDescriptor descr = fileToDescriptor.get(f);
            descr.setTreatmentGroup(treatmentGroupDescriptor);
            tgc.addMembers(descr);
        }
        tgc.setName(group);
        tgc.setDisplayName(group);
        icui.addContainer(tgc);
    }
}

From source file:runtheshow.resource.webservice.InvitationService.java

/**
 * //from w  w w  .  jav a2s . co  m
 * @param invit
 * @return 
 */
@RequestMapping(value = "/accepterInvit", method = RequestMethod.POST, consumes = "application/json; charset=UTF-8", produces = "application/json; charset=UTF-8")
public JSONObject accepterInvitation(@RequestBody Object o, HttpServletResponse response) {
    LinkedHashMap lhm = (LinkedHashMap) o;
    long idInvit = (long) (int) lhm.get("id");
    invitationMetier.accepterInvitation(invitationMetier.getInvitationById(idInvit));
    return null;
}

From source file:runtheshow.resource.webservice.InvitationService.java

/**
 * /*from   w w w. ja va  2  s.com*/
 * @param invit
 * @return 
 */
@RequestMapping(value = "/refuserInvit", method = RequestMethod.POST, consumes = "application/json; charset=UTF-8", produces = "application/json; charset=UTF-8")
public JSONObject refuserInvit(@RequestBody Object o, HttpServletResponse response) {
    LinkedHashMap lhm = (LinkedHashMap) o;
    long idInvit = (long) (int) lhm.get("id");
    invitationMetier.refuserInvitation(invitationMetier.getInvitationById(idInvit));
    return null;
}

From source file:edu.usc.irds.sparkler.SparklerConfiguration.java

public LinkedHashMap<String, Object> getPluginConfiguration(String pluginId) throws SparklerException {
    if (this.containsKey(Constants.key.PLUGINS)) {
        LinkedHashMap plugins = (LinkedHashMap) this.get(Constants.key.PLUGINS);
        if (plugins.containsKey(pluginId)) {
            return (LinkedHashMap<String, Object>) plugins.get(pluginId);
        } else {/*from  ww  w  .  j  ava2 s.c  o m*/
            throw new SparklerException("No configuration found for Plugin: " + pluginId);
        }
    } else {
        throw new SparklerException("No plugin configuration found!");
    }
}

From source file:de.document.controller.MedikamentController.java

@RequestMapping(value = "/search/used/", method = { RequestMethod.POST })
public List searchUsedListMedikament(@RequestBody Object listMedikament) throws IOException, ParseException {
    List request = new ArrayList();
    List<Medikament> request2 = new ArrayList();
    request = (List) listMedikament;
    for (Object item : request) {
        LinkedHashMap itemx = (LinkedHashMap) item;
        request2.add(new Medikament(itemx.get("bezeichnung").toString(), itemx.get("pzn").toString(),
                itemx.get("einheit").toString(), itemx.get("roteListe").toString(),
                itemx.get("darr").toString(), itemx.get("inhaltsstoff").toString()));
    }//w  ww  .j av a  2 s  . c om
    System.out.println(request2);
    if (!request2.isEmpty()) {
        return service.searchUsedMedikament(request2);
    }
    return null;
}

From source file:com.opengamma.analytics.financial.interestrate.capletstripping.SABRTermStructureModelProvider.java

/**
 * @param x The concatenated nodes that form the interpolated SABR parameter curves 
 * @return a VolatilityModel1D (SABRTermStructureParameters)
 *///from  w w  w . jav a2  s  .com
@Override
public VolatilityModel1D evaluate(final DoubleMatrix1D x) {
    final LinkedHashMap<String, InterpolatedDoublesCurve> curves = getCurves(x);
    return new SABRTermStructureParameters(curves.get(ALPHA), curves.get(BETA), curves.get(RHO),
            curves.get(NU));
}

From source file:com.pimp.companionforband.utils.jsontocsv.writer.CSVWriter.java

private String getCommaSeperatedRow(LinkedHashSet<String> headers, LinkedHashMap<String, String> map) {
    List<String> items = new ArrayList<>();
    for (String header : headers) {
        String value = map.get(header) == null ? "" : map.get(header).replace(",", "");
        items.add(value);/*from ww w.j  a v a2  s.c o m*/
    }
    return StringUtils.join(items.toArray(), ",");
}