List of usage examples for java.lang String hashCode
public int hashCode()
From source file:ch.epfl.data.squall.operators.ApproximateCountSketchOperator.java
@Override public Long runAggregateFunction(Long value, List<String> tuple) { System.out.println("ZKM: runAggregateFunction(" + value + " " + tuple + ")"); // I need list item _field from tuple. String tmp_bs = tuple.get(_field); long hash = tmp_bs.hashCode(); final Long v = _scm.UpdateSketch(hash, 1); return v;//from w ww . j av a2 s . com }
From source file:com.jaspersoft.jasperserver.api.engine.common.virtualdatasourcequery.impl.AbstractVirtualDataSourceQueryServiceImpl.java
private String getCustomDataSourceID(CustomDataSource customDataSource) { String key = customDataSource.getPropertyMap().toString(); return key.hashCode() + ""; }
From source file:com.opengamma.masterdb.security.hibernate.cashflow.CashFlowSecurityBean.java
@Override protected void propertySet(String propertyName, Object newValue, boolean quiet) { switch (propertyName.hashCode()) { case 575402001: // currency setCurrency((CurrencyBean) newValue); return;//from w ww . ja v a2s. c o m case 73828649: // settlement setSettlement((ZonedDateTimeBean) newValue); return; case -1413853096: // amount setAmount((Double) newValue); return; } super.propertySet(propertyName, newValue, quiet); }
From source file:gov.nih.nci.evs.browser.utils.CacheController.java
private static String getTreeKey(String codingScheme, String version, String code) { return String.valueOf("Tree".hashCode() + codingScheme.hashCode() + version.hashCode() + code.hashCode()); }
From source file:com.npower.dm.bootstrap.BootstrapServiceSettingsImpl.java
/** * @param msisdn/*from w w w. ja v a2 s . c o m*/ * @param profile * @param pinType * @param pin * @param scheduleTime * @param maxRetry * @param maxDuration * @throws DMException * @throws SmsException */ protected long bootstrap(String msisdn, Properties profile, OMACPSecurityMethod pinType, String pin, long scheduleTime, int maxRetry, long maxDuration) throws DMException, SmsException { OMAClientProvSettings settings = new OMAClientProvSettings(); // Build NAP or Proxy String napDefNapID = this.getProperty(profile, "napdef_napid"); if (StringUtils.isNotEmpty(napDefNapID)) { // NAP NAPDefElement nap = this.createNAPDef(profile); settings.addNAPDefElement(nap); } String pxLogicID = this.getProperty(profile, "pxlogic_id"); if (StringUtils.isNotEmpty(pxLogicID)) { // NAP with Proxy PXLogicalElement proxy = this.createProxyDef(profile, napDefNapID); settings.addPXLogicalElement(proxy); } // Build and add DM document. ApplicationElement app = buildDMApplication(profile, napDefNapID, pxLogicID, msisdn); settings.addApplicationElement(app); // Set Security settings.setPIN(pin); settings.setSecurityMethod(pinType); try { // Send Bootstrap Message. log.info("Bootstrap, device msisdn: " + msisdn); String msgID = this.getSmsSender().send(settings.getSmsWapPushMessage(), msisdn, msisdn, scheduleTime, maxRetry, maxDuration); return msgID.hashCode(); } catch (OTAException e) { throw new DMException("Error in find OTA Template.", e); } catch (SmsException e) { throw e; } catch (IOException e) { throw new DMException("Error in Send SMS for bootstrap.", e); } catch (Exception e) { throw new DMException("Error in Send SMS for bootstrap.", e); } }
From source file:com.xpn.xwiki.stats.impl.VisitStats.java
/** * @param uniqueID the unique id of the user visit. *///from w w w.j a va 2 s. c om public void setUniqueID(String uniqueID) { // Changing the unique ID is changing the number if (getStartDate() != null) { String nb = uniqueID + getStartDate().getTime(); setNumber(nb.hashCode()); } setStringValue(Property.uniqueID.toString(), uniqueID); }
From source file:com.xpn.xwiki.plugin.svg.SVGPlugin.java
public byte[] getSVGImage(String content, String extension, int height, int width) throws IOException, SVGConverterException { int hashCode = Math.abs(content.hashCode()); return getSVGImage(hashCode, content, extension, height, width); }
From source file:cognition.common.model.Individual.java
public String getHash() { List<Date> dateOfBirths = getDateOfBirths(); List<String> foreNames = getForeNamesInDescendingLengthOrder(); List<String> lastNames = getLastNamesInDescendingLengthOrder(); StringBuilder stringBuilder = new StringBuilder(); if (CollectionUtils.isNotEmpty(dateOfBirths)) { stringBuilder.append(dateOfBirths.get(0)); }//w w w .jav a 2 s.com if (CollectionUtils.isNotEmpty(foreNames)) { stringBuilder.append(foreNames.get(0)); } if (CollectionUtils.isNotEmpty(lastNames)) { stringBuilder.append(lastNames.get(0)); } String result = stringBuilder.toString(); return String.valueOf(result.hashCode()); }
From source file:com.xpn.xwiki.plugin.svg.SVGPlugin.java
public String writeSVGImage(String content, String extension, int height, int width) throws IOException, SVGConverterException { int hashCode = Math.abs(content.hashCode()); getSVGImage(hashCode, content, extension, height, width); return hashCode + "." + extension; }
From source file:org.ulyssis.ipp.TagId.java
/** * = Create a new TagId//from w ww. ja v a2 s . co m * * @param id * A string that uniquely identifies the tag * @throws java.lang.NullPointerException * A NullPointerException will be thrown if the given id is null. */ public TagId(String id) throws NullPointerException { if (id == null) throw new NullPointerException("The tag id is not allowed to be null!"); this.id = id; this.lowerCaseId = id.toLowerCase(); this.hashCode = id.hashCode(); }