Codota Logo
LongObjMap
Code IndexAdd Codota to your IDE (free)

How to use
LongObjMap
in
com.koloboke.collect.map

Best Java code snippets using com.koloboke.collect.map.LongObjMap (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: mewna/catnip

@SuppressWarnings(value = "unchecked")
public boolean containsAllEntries(Map<?, ?> m) {
  if (KolobokeLongEntityMap.identical(KolobokeLongEntityMap.this, m))
    throw new IllegalArgumentException();
  
  if (m instanceof LongObjMap) {
    LongObjMap m2 = ((LongObjMap) (m));
    if (m2.valueEquivalence().equals(KolobokeLongEntityMap.this.valueEquivalence())) {
      if ((KolobokeLongEntityMap.this.size()) < (m2.size()))
        return false;
      
      if ((InternalLongObjMapOps.class.isAssignableFrom(getClass())) && (m2 instanceof InternalLongObjMapOps)) {
        return ((InternalLongObjMapOps) (m2)).allEntriesContainingIn(((InternalLongObjMapOps<?>) (InternalLongObjMapOps.class.cast(KolobokeLongEntityMap.this))));
      }
    }
    return m2.forEachWhile(new LongObjPredicate() {
      @Override
      public boolean test(long a, Object b) {
        return containsEntry(a, b);
      }
    });
  }
  for (Map.Entry<?, ?> e : m.entrySet()) {
    if (!(containsEntry(((Long) (e.getKey())), e.getValue())))
      return false;
    
  }
  return true;
}

origin: mewna/catnip

@Override
public void putAll(@Nonnull
              Map<? extends Long, ? extends T> m) {
  if (KolobokeLongEntityMap.identical(KolobokeLongEntityMap.this, m))
    throw new IllegalArgumentException();
  
  long maxPossibleSize = (sizeAsLong()) + (Containers.sizeAsLong(m));
  ensureCapacity(maxPossibleSize);
  if (m instanceof LongObjMap) {
    if ((InternalLongObjMapOps.class.isAssignableFrom(getClass())) && (m instanceof InternalLongObjMapOps)) {
      ((InternalLongObjMapOps) (m)).reversePutAllTo(((InternalLongObjMapOps<? super T>) (InternalLongObjMapOps.class.cast(KolobokeLongEntityMap.this))));
    } else {
      ((LongObjMap) (m)).forEach(new LongObjConsumer<T>() {
        @Override
        public void accept(long key, T value) {
          justPut(key, value);
        }
      });
    }
  } else {
    for (Map.Entry<? extends Long, ? extends T> e : m.entrySet()) {
      justPut(e.getKey(), e.getValue());
    }
  }
}

origin: com.koloboke/koloboke-impl-common-jdk6-7

public static <V> void putAll(final InternalLongObjMapOps<V> map,
    Map<? extends Long, ? extends V> another) {
  if (map == another)
    throw new IllegalArgumentException();
  long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another);
  map.ensureCapacity(maxPossibleSize);
  if (another instanceof LongObjMap) {
    if (another instanceof InternalLongObjMapOps) {
      ((InternalLongObjMapOps) another).reversePutAllTo(map);
    } else {
      ((LongObjMap) another).forEach(new LongObjConsumer<V>() {
        @Override
        public void accept(long key, V value) {
          map.justPut(key, value);
        }
      });
    }
  } else {
    for (Map.Entry<? extends Long, ? extends V> e : another.entrySet()) {
      map.justPut(e.getKey(), e.getValue());
    }
  }
}
origin: com.koloboke/koloboke-impl-common-jdk8

if (
    m2.valueEquivalence().equals(map.valueEquivalence())
) {
  if (map.size() < m2.size())
    return false;
  if (m2 instanceof InternalLongObjMapOps) {
return m2.forEachWhile(new
    LongObjPredicate() {
  @Override
origin: com.koloboke/koloboke-impl-common-jdk8

public static <V> void putAll(final InternalLongObjMapOps<V> map,
    Map<? extends Long, ? extends V> another) {
  if (map == another)
    throw new IllegalArgumentException();
  long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another);
  map.ensureCapacity(maxPossibleSize);
  if (another instanceof LongObjMap) {
    if (another instanceof InternalLongObjMapOps) {
      ((InternalLongObjMapOps) another).reversePutAllTo(map);
    } else {
      ((LongObjMap) another).forEach(new LongObjConsumer<V>() {
        @Override
        public void accept(long key, V value) {
          map.justPut(key, value);
        }
      });
    }
  } else {
    for (Map.Entry<? extends Long, ? extends V> e : another.entrySet()) {
      map.justPut(e.getKey(), e.getValue());
    }
  }
}
origin: com.koloboke/koloboke-impl-common-jdk6-7

if (
    m2.valueEquivalence().equals(map.valueEquivalence())
) {
  if (map.size() < m2.size())
    return false;
  if (m2 instanceof InternalLongObjMapOps) {
return m2.forEachWhile(new
    LongObjPredicate() {
  @Override
com.koloboke.collect.mapLongObjMap

Javadoc

A Map specialization with long keys and Object values.

Most used methods

  • forEach
  • forEachWhile
    Checks the given predicate on each entry in this map until all entries have been processed or the pr
  • size
  • valueEquivalence
    Returns the equivalence strategy for values in this map. All methods in the Mapinterface which defin

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now