public int deepHashCode() { int hash = 3; short[] keys = idMap.keySet().toShortArray(); Arrays.sort(keys); for (int i = 0; i < keys.length; i++) { Short s = keys[i]; Object o = idMap.get(s); hash = 67 * hash + (o != null ? o.hashCode() : 0); hash = 67 * hash + s.hashCode(); } return hash; }
@Override public ShortColumn unique() { final ShortSet values = new ShortOpenHashSet(); for (int i = 0; i < size(); i++) { if (!isMissing(i)) { values.add(getShort(i)); } } final ShortColumn column = ShortColumn.create(name() + " Unique values"); for (short value : values) { column.append(value); } return column; }
/** * Removes an element from this set. * * <p> * This method is inherited from the type-specific collection this type-specific * set is based on, but it should not used as this interface reinstates * {@code remove()} as removal method. * * @deprecated Please use {@code remove()} instead. */ @Deprecated @Override default boolean rem(short k) { return remove(k); } }
public int deepHashCode() { int hash = 3; short[] keys = idMap.keySet().toShortArray(); Arrays.sort(keys); for (int i = 0; i < keys.length; i++) { Short s = keys[i]; Object o = idMap.get(s); hash = 67 * hash + (o != null ? o.hashCode() : 0); hash = 67 * hash + s.hashCode(); } return hash; }
@Override public ShortColumn unique() { final ShortSet values = new ShortOpenHashSet(); for (int i = 0; i < size(); i++) { if (!isMissing(i)) { values.add(getShort(i)); } } final ShortColumn column = ShortColumn.create(name() + " Unique values"); for (short value : values) { column.append(value); } return column; }
serialize(out, map.values().toArray()); } else if (oCls.equals(Short2ObjectOpenHashMap.class)) { serialize(out, ((Short2ObjectOpenHashMap) map).keySet().toShortArray()); serialize(out, map.values().toArray()); } else if (oCls.equals(Long2ObjectOpenHashMap.class)) {
serialize(out, map.values().toArray()); } else if (oCls.equals(Short2ObjectOpenHashMap.class)) { serialize(out, ((Short2ObjectOpenHashMap) map).keySet().toShortArray()); serialize(out, map.values().toArray()); } else if (oCls.equals(Long2ObjectOpenHashMap.class)) {