当前位置: 首页>>代码示例>>Java>>正文


Java TObjectHashingStrategy.computeHashCode方法代码示例

本文整理汇总了Java中gnu.trove.TObjectHashingStrategy.computeHashCode方法的典型用法代码示例。如果您正苦于以下问题:Java TObjectHashingStrategy.computeHashCode方法的具体用法?Java TObjectHashingStrategy.computeHashCode怎么用?Java TObjectHashingStrategy.computeHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gnu.trove.TObjectHashingStrategy的用法示例。


在下文中一共展示了TObjectHashingStrategy.computeHashCode方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: WeakKey

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
WeakKey(@NotNull K k,
        @NotNull ValueReference<K, V> valueReference,
        @NotNull TObjectHashingStrategy<K> strategy,
        @NotNull ReferenceQueue<K> queue) {
  super(k, queue);
  myValueReference = valueReference;
  myHash = strategy.computeHashCode(k);
  myStrategy = strategy;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ConcurrentWeakKeySoftValueHashMap.java

示例2: RefHashMap

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
public RefHashMap(@NotNull final TObjectHashingStrategy<K> hashingStrategy) {
  this(4, 0.8f, new TObjectHashingStrategy<Key<K>>() {
    @Override
    public int computeHashCode(final Key<K> object) {
      return hashingStrategy.computeHashCode(object.get());
    }

    @Override
    public boolean equals(final Key<K> o1, final Key<K> o2) {
      return hashingStrategy.equals(o1.get(), o2.get());
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:RefHashMap.java

示例3: convertKToKeyK

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
@NotNull
private static <K,V> TObjectHashingStrategy<Key<K, V>> convertKToKeyK(@NotNull final TObjectHashingStrategy<K> hashingStrategy) {
  return new TObjectHashingStrategy<Key<K, V>>() {
    @Override
    public int computeHashCode(final Key<K, V> object) {
      return hashingStrategy.computeHashCode(object.get());
    }

    @Override
    public boolean equals(final Key<K, V> o1, final Key<K, V> o2) {
      return hashingStrategy.equals(o1.get(), o2.get());
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:ConcurrentRefHashMap.java

示例4: SoftKey

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
SoftKey(@Nonnull K k,
        @Nonnull ValueReference<K, V> valueReference,
        @Nonnull TObjectHashingStrategy<K> strategy,
        @Nonnull ReferenceQueue<K> queue) {
  super(k, queue);
  myValueReference = valueReference;
  myHash = strategy.computeHashCode(k);
  myStrategy = strategy;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:ConcurrentSoftKeySoftValueHashMap.java

示例5: WeakKey

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
WeakKey(@Nonnull K k,
        @Nonnull ValueReference<K, V> valueReference,
        @Nonnull TObjectHashingStrategy<K> strategy,
        @Nonnull ReferenceQueue<K> queue) {
  super(k, queue);
  myValueReference = valueReference;
  myHash = strategy.computeHashCode(k);
  myStrategy = strategy;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:ConcurrentWeakKeySoftValueHashMap.java

示例6: createKeyReference

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
@Override
protected KeyReference<K, V> createKeyReference(@NotNull K key, @NotNull V value, @NotNull TObjectHashingStrategy<K> hashingStrategy) {
  return new SoftKey<K, V>(key, hashingStrategy.computeHashCode(key), hashingStrategy, value, myReferenceQueue);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ConcurrentSoftHashMap.java

示例7: createKeyReference

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
@Override
protected KeyReference<K, V> createKeyReference(@NotNull K key, @NotNull V value, @NotNull TObjectHashingStrategy<K> hashingStrategy) {
  return new WeakKey<K, V>(key, hashingStrategy.computeHashCode(key), hashingStrategy, value, myReferenceQueue);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ConcurrentWeakHashMap.java

示例8: createKeyReference

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
@Override
protected KeyReference<K, V> createKeyReference(@Nonnull K key, @Nonnull V value, @Nonnull TObjectHashingStrategy<K> hashingStrategy) {
  return new SoftKey<K, V>(key, hashingStrategy.computeHashCode(key), hashingStrategy, value, myReferenceQueue);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:ConcurrentSoftHashMap.java

示例9: WeakKey

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
private WeakKey(@Nonnull T k, @Nonnull TObjectHashingStrategy<T> strategy, @Nonnull ReferenceQueue<? super T> q) {
  super(k, q);
  myStrategy = strategy;
  myHash = strategy.computeHashCode(k);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:WeakHashMap.java

示例10: createKeyReference

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
@Override
protected KeyReference<K, V> createKeyReference(@Nonnull K key, @Nonnull V value, @Nonnull TObjectHashingStrategy<K> hashingStrategy) {
  return new WeakKey<K, V>(key, hashingStrategy.computeHashCode(key), hashingStrategy, value, myReferenceQueue);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:ConcurrentWeakHashMap.java

示例11: SoftKey

import gnu.trove.TObjectHashingStrategy; //导入方法依赖的package包/类
private SoftKey(@Nonnull T k, @Nonnull TObjectHashingStrategy<T> strategy, @Nonnull ReferenceQueue<? super T> q) {
  super(k, q);
  myStrategy = strategy;
  myHash = strategy.computeHashCode(k);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:SoftHashMap.java


注:本文中的gnu.trove.TObjectHashingStrategy.computeHashCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。