java.util.Locale.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中java.util.Locale.hashCode()方法的一些代码示例,展示了Locale.hashCode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Locale.hashCode()方法的具体详情如下:
包路径:java.util.Locale
类名称:Locale
方法名:hashCode

Locale.hashCode介绍

[英]Override hashCode. Since Locales are often used in hashtables, caches the value for speed.
[中]重写哈希代码。由于区域设置通常用于哈希表中,因此缓存速度值。

代码示例

代码示例来源:origin: skylot/jadx

@Override
  public int hashCode() {
    return locale.hashCode();
  }
}

代码示例来源:origin: prestodb/presto

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + combinedTypeAndStyle;
  result = prime * result + ((locale == null) ? 0 : locale.hashCode());
  return result;
}

代码示例来源:origin: commons-lang/commons-lang

/**
 * {@inheritDoc}
 */
public int hashCode() {
  return mStyle * 31 + mLocale.hashCode();
}

代码示例来源:origin: joda-time/joda-time

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + combinedTypeAndStyle;
  result = prime * result + ((locale == null) ? 0 : locale.hashCode());
  return result;
}

代码示例来源:origin: JodaOrg/joda-time

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + combinedTypeAndStyle;
  result = prime * result + ((locale == null) ? 0 : locale.hashCode());
  return result;
}

代码示例来源:origin: org.apache.commons/commons-lang3

/**
 * {@inheritDoc}
 */
@Override
public int hashCode() {
  return (mStyle * 31 + mLocale.hashCode() ) * 31 + mTimeZone.hashCode();
}

代码示例来源:origin: org.apache.commons/commons-lang3

/**
 * <p>Returns a hash code compatible with equals.</p>
 *
 * @return a hash code compatible with equals
 */
@Override
public int hashCode() {
  return mPattern.hashCode() + 13 * (mTimeZone.hashCode() + 13 * mLocale.hashCode());
}

代码示例来源:origin: org.apache.commons/commons-lang3

/**
 * <p>Return a hash code compatible with equals.</p>
 *
 * @return a hash code compatible with equals
 */
@Override
public int hashCode() {
  return pattern.hashCode() + 13 * (timeZone.hashCode() + 13 * locale.hashCode());
}

代码示例来源:origin: looly/hutool

/**
 * {@inheritDoc}
 */
@Override
public int hashCode() {
  return (mStyle * 31 + mLocale.hashCode()) * 31 + mTimeZone.hashCode();
}

代码示例来源:origin: looly/hutool

/**
 * {@inheritDoc}
 */
@Override
public int hashCode() {
  return (mStyle * 31 + mLocale.hashCode()) * 31 + mTimeZone.hashCode();
}

代码示例来源:origin: commons-lang/commons-lang

/**
 * <p>Returns a hashcode compatible with equals.</p>
 * 
 * @return a hashcode compatible with equals
 */
public int hashCode() {
  int total = 0;
  total += mPattern.hashCode();
  total += mTimeZone.hashCode();
  total += (mTimeZoneForced ? 1 : 0);
  total += mLocale.hashCode();
  total += (mLocaleForced ? 1 : 0);
  return total;
}

代码示例来源:origin: looly/hutool

@Override
public int hashCode() {
  return pattern.hashCode() + 13 * (timeZone.hashCode() + 13 * locale.hashCode());
}

代码示例来源:origin: looly/hutool

@Override
public int hashCode() {
  return pattern.hashCode() + 13 * (timeZone.hashCode() + 13 * locale.hashCode());
}

代码示例来源:origin: ltsopensource/light-task-scheduler

@Override
public int hashCode() {
  return mPattern.hashCode() + 13 * (mTimeZone.hashCode() + 13 * mLocale.hashCode());
}

代码示例来源:origin: ltsopensource/light-task-scheduler

@Override
public int hashCode() {
  return pattern.hashCode() + 13 * (timeZone.hashCode() + 13 * locale.hashCode());
}

代码示例来源:origin: ltsopensource/light-task-scheduler

@Override
public int hashCode() {
  return pattern.hashCode() + 13 * (timeZone.hashCode() + 13 * locale.hashCode());
}

代码示例来源:origin: apache/incubator-druid

@Override
public int hashCode()
{
 int result = format != null ? format.hashCode() : 0;
 result = 31 * result + (tz != null ? tz.hashCode() : 0);
 result = 31 * result + (locale != null ? locale.hashCode() : 0);
 result = 31 * result + (granularity != null ? granularity.hashCode() : 0);
 result = 31 * result + (asMillis ? 1 : 0);
 return result;
}

代码示例来源:origin: prestodb/presto

@Override
public int hashCode() {
   int hash = (_timezoneStr == null) ? 1 : _timezoneStr.hashCode();
   if (_pattern != null) {
     hash ^= _pattern.hashCode();
   }
   hash += _shape.hashCode();
   if (_lenient != null) {
     hash ^= _lenient.hashCode();
   }
   if (_locale != null) {
     hash += _locale.hashCode();
   }
   hash ^= _features.hashCode();
   return hash;
}

代码示例来源:origin: redisson/redisson

@Override
public int hashCode() {
   int hash = (_timezoneStr == null) ? 1 : _timezoneStr.hashCode();
   if (_pattern != null) {
     hash ^= _pattern.hashCode();
   }
   hash += _shape.hashCode();
   if (_lenient != null) {
     hash ^= _lenient.hashCode();
   }
   if (_locale != null) {
     hash += _locale.hashCode();
   }
   hash ^= _features.hashCode();
   return hash;
}

代码示例来源:origin: com.fasterxml.jackson.core/jackson-annotations

@Override
public int hashCode() {
   int hash = (_timezoneStr == null) ? 1 : _timezoneStr.hashCode();
   if (_pattern != null) {
     hash ^= _pattern.hashCode();
   }
   hash += _shape.hashCode();
   if (_lenient != null) {
     hash ^= _lenient.hashCode();
   }
   if (_locale != null) {
     hash += _locale.hashCode();
   }
   hash ^= _features.hashCode();
   return hash;
}

相关文章