congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Byte2ObjectOpenHashMap.insert
Code IndexAdd Tabnine to your IDE (free)

How to use
insert
method
in
it.unimi.dsi.fastutil.bytes.Byte2ObjectOpenHashMap

Best Java code snippets using it.unimi.dsi.fastutil.bytes.Byte2ObjectOpenHashMap.insert (Showing top 5 results out of 315)

origin: it.unimi.dsi/fastutil

/** {@inheritDoc} */
@Override
public V putIfAbsent(final byte k, final V v) {
  final int pos = find(k);
  if (pos >= 0)
    return value[pos];
  insert(-pos - 1, k, v);
  return defRetValue;
}
/** {@inheritDoc} */
origin: it.unimi.dsi/fastutil

@Override
public V put(final byte k, final V v) {
  final int pos = find(k);
  if (pos < 0) {
    insert(-pos - 1, k, v);
    return defRetValue;
  }
  final V oldValue = value[pos];
  value[pos] = v;
  return oldValue;
}
/**
origin: it.unimi.dsi/fastutil

/** {@inheritDoc} */
@Override
public V computeIfAbsent(final byte k, final java.util.function.IntFunction<? extends V> mappingFunction) {
  java.util.Objects.requireNonNull(mappingFunction);
  final int pos = find(k);
  if (pos >= 0)
    return value[pos];
  final V newValue = mappingFunction.apply(k);
  insert(-pos - 1, k, newValue);
  return newValue;
}
/** {@inheritDoc} */
origin: it.unimi.dsi/fastutil

/** {@inheritDoc} */
@Override
public V compute(final byte k,
    final java.util.function.BiFunction<? super Byte, ? super V, ? extends V> remappingFunction) {
  java.util.Objects.requireNonNull(remappingFunction);
  final int pos = find(k);
  final V newValue = remappingFunction.apply(Byte.valueOf(k), pos >= 0 ? (value[pos]) : null);
  if (newValue == null) {
    if (pos >= 0) {
      if (((k) == ((byte) 0)))
        removeNullEntry();
      else
        removeEntry(pos);
    }
    return defRetValue;
  }
  V newVal = (newValue);
  if (pos < 0) {
    insert(-pos - 1, k, newVal);
    return newVal;
  }
  return value[pos] = newVal;
}
/** {@inheritDoc} */
origin: it.unimi.dsi/fastutil

/** {@inheritDoc} */
@Override
public V merge(final byte k, final V v,
    final java.util.function.BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
  java.util.Objects.requireNonNull(remappingFunction);
  final int pos = find(k);
  if (pos < 0 || value[pos] == null) {
    if (v == null)
      return defRetValue;
    insert(-pos - 1, k, v);
    return v;
  }
  final V newValue = remappingFunction.apply((value[pos]), (v));
  if (newValue == null) {
    if (((k) == ((byte) 0)))
      removeNullEntry();
    else
      removeEntry(pos);
    return defRetValue;
  }
  return value[pos] = (newValue);
}
/*
it.unimi.dsi.fastutil.bytesByte2ObjectOpenHashMapinsert

Popular methods of Byte2ObjectOpenHashMap

  • <init>
    Creates a new hash map using the elements of two parallel arrays.
  • put
  • clear
  • containsValue
  • ensureCapacity
  • find
  • get
  • keySet
  • putAll
  • realSize
  • rehash
    Rehashes the map. This method implements the basic rehashing strategy, and may be overridden by subc
  • removeEntry
  • rehash,
  • removeEntry,
  • removeNullEntry,
  • shiftKeys,
  • size,
  • tryCapacity

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Reference (javax.naming)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now