List of usage examples for java.lang String hashCode
public int hashCode()
From source file:com.hardincoding.sonar.subsonic.service.SubsonicMusicService.java
private String getCachedIndexesFilename(Context context, String musicFolderId) { String s = getRestUrl(null) + musicFolderId; return "indexes-" + Math.abs(s.hashCode()) + ".ser"; }
From source file:com.opengamma.component.factory.livedata.LiveMarketDataProviderFactoryComponentFactory.java
@Override protected Object propertyGet(String propertyName, boolean quiet) { switch (propertyName.hashCode()) { case -281470431: // classifier return getClassifier(); case -1495762275: // jmsConnector return getJmsConnector(); case 1263631201: // defaultProviders return getDefaultProviders(); }/*ww w . j a v a2 s . c o m*/ return super.propertyGet(propertyName, quiet); }
From source file:com.opengamma.masterdb.security.hibernate.fx.NonDeliverableFXForwardSecurityBean.java
@Override protected Object propertyGet(String propertyName, boolean quiet) { switch (propertyName.hashCode()) { case 1652755475: // forwardDate return getForwardDate(); case -934795532: // region return getRegion(); case -295641895: // payCurrency return getPayCurrency(); case -1338781920: // payAmount return getPayAmount(); case -1228590060: // receiveCurrency return getReceiveCurrency(); case 984267035: // receiveAmount return getReceiveAmount(); case 2073187722: // deliverInReceiveCurrency return isDeliverInReceiveCurrency(); }//from www .j av a2 s . co m return super.propertyGet(propertyName, quiet); }
From source file:com.facebook.TestUserManager.java
private String getSharedTestAccountIdentifier(List<String> permissions, String uniqueUserTag) { // We use long even though hashes are ints to avoid sign issues. long permissionsHash = getPermissionsString(permissions).hashCode() & 0xffffffffL; long userTagHash = (uniqueUserTag != null) ? uniqueUserTag.hashCode() & 0xffffffffL : 0; long combinedHash = permissionsHash ^ userTagHash; return validNameStringFromInteger(combinedHash); }
From source file:com.opengamma.core.config.impl.ConfigItem.java
@Override protected Object propertyGet(String propertyName, boolean quiet) { switch (propertyName.hashCode()) { case 111972721: // value return getValue(); case -294460212: // uniqueId return getUniqueId(); case 3373707: // name return getName(); case 3575610: // type return getType(); }/*from w w w . ja v a 2s. co m*/ return super.propertyGet(propertyName, quiet); }
From source file:com.opengamma.core.position.impl.SimplePortfolio.java
@SuppressWarnings("unchecked") @Override//from w w w.ja v a 2 s.co m protected void propertySet(String propertyName, Object newValue, boolean quiet) { switch (propertyName.hashCode()) { case -294460212: // uniqueId setUniqueId((UniqueId) newValue); return; case 3373707: // name setName((String) newValue); return; case -167026172: // rootNode setRootNode((SimplePortfolioNode) newValue); return; case 405645655: // attributes setAttributes((Map<String, String>) newValue); return; } super.propertySet(propertyName, newValue, quiet); }
From source file:com.ecyrd.jspwiki.auth.permissions.PagePermission.java
/** * Returns the hash code for this PagePermission. * @return {@inheritDoc}// www .j a v a2 s .co m */ public final int hashCode() { // If the wiki has not been set, uses a dummy value for the hashcode // calculation. This may occur if the page given does not refer // to any particular wiki String wiki = m_wiki != null ? m_wiki : "dummy_value"; return m_mask + ((13 * m_actionString.hashCode()) * 23 * wiki.hashCode()); }
From source file:info.joseluismartin.gtc.AbstractTileCache.java
/** * @return File path of a tile in disk cache */// w ww.j a v a 2s . c om protected String getCachePath(Tile tile) { int x = tile.getX(); int y = tile.getY(); int zoom = tile.getZoom(); String type = tile.getType(); String layer = tile.getLayer(); String path = getCachePath() + File.separator + getPath(); if (!StringUtils.isBlank(type)) { path += File.separator + type; } if (!StringUtils.isBlank(layer)) { path += File.separator + Integer.toHexString(layer.hashCode()); } path += File.separator + zoom + File.separator + x + File.separator + y + ".png"; // path += File.separator + zoom + File.separator + x / 1024 + // File.separator + x % 1024 + File.separator + y / 1024 + // File.separator + y % 1024 + ".png"; return path; }
From source file:com.opengamma.component.factory.livedata.LiveMarketDataProviderFactoryComponentFactory.java
@Override protected void propertySet(String propertyName, Object newValue, boolean quiet) { switch (propertyName.hashCode()) { case -281470431: // classifier setClassifier((String) newValue); return;//from w w w. ja v a 2 s . c o m case -1495762275: // jmsConnector setJmsConnector((JmsConnector) newValue); return; case 1263631201: // defaultProviders setDefaultProviders((String) newValue); return; } super.propertySet(propertyName, newValue, quiet); }
From source file:com.opengamma.masterdb.security.hibernate.cash.CashSecurityBean.java
@Override protected void propertySet(String propertyName, Object newValue, boolean quiet) { switch (propertyName.hashCode()) { case 575402001: // currency setCurrency((CurrencyBean) newValue); return;//from ww w .j a v a2s . c o m case -934795532: // region setRegion((ExternalIdBean) newValue); return; case 109757538: // start setStart((ZonedDateTimeBean) newValue); return; case 313843601: // maturity setMaturity((ZonedDateTimeBean) newValue); return; case 1905311443: // dayCount setDayCount((DayCountBean) newValue); return; case 3493088: // rate setRate((Double) newValue); return; case -1413853096: // amount setAmount((Double) newValue); return; } super.propertySet(propertyName, newValue, quiet); }