コード例 #1
0
ファイル: Pack.java プロジェクト: legnaleurc/picking
 private static <T> Boolean needSearch(Long limit, AbstractMap<T, Long> items) {
   Long sum = 0L;
   for (Long v : items.values()) {
     sum += v;
   }
   return sum > limit;
 }
コード例 #2
0
 /**
  * Returns a shallow copy of this <tt>AbstractMap</tt> instance: the keys and values themselves
  * are not cloned.
  *
  * @return a shallow copy of this map.
  */
 protected Object clone() throws CloneNotSupportedException {
   AbstractMap result = (AbstractMap) super.clone();
   result.keySet = null;
   result.values = null;
   return result;
 }