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

How to use
MapEntry
in
jodd.util.collection

Best Java code snippets using jodd.util.collection.MapEntry (Showing top 6 results out of 315)

origin: oblac/jodd

public FakeMapEntrySet(final int size, final Object[] keys, final Object[] values) {
  array = new Map.Entry[size];
  for (int index = 0; index < size; index++) {
    array[index] = new MapEntry(keys[index], values[index]);
  }
}
origin: oblac/jodd

@Override
public Map.Entry<String, Object> next() {
  Map.Entry<String, Object> entry = mapIterator.next();
  if (entry.getValue() instanceof Map) {
    return MapEntry.createUnmodifiable(entry.getKey(), new JsonObject((Map) entry.getValue()));
  }
  if (entry.getValue() instanceof List) {
    return MapEntry.createUnmodifiable(entry.getKey(), new JsonArray((List) entry.getValue()));
  }
  return entry;
}
origin: oblac/jodd

  @Test
  void testUnmodifiableMapEntry() {
    MapEntry<String, Integer> mapEntry1 = MapEntry.createUnmodifiable("foo", 3);

    try {
      mapEntry1.setValue(123);
      fail("error");
    }
    catch (UnsupportedOperationException ignore) {
    }
  }
}
origin: oblac/jodd

@Test
void testMapEntryEquals() {
  MapEntry<String, Integer> mapEntry1 = MapEntry.create("foo", 3);
  MapEntry<String, Integer> mapEntry2 = MapEntry.create("foo", 3);
  assertTrue(mapEntry1.equals(mapEntry2));
  assertTrue(mapEntry2.equals(mapEntry1));
}
origin: oblac/jodd

public static <T, R> MapEntry<T, R> create(final T key, final R value) {
  return new MapEntry<>(key, value);
}
origin: org.jodd/jodd-core

public static <T, R> MapEntry<T, R> create(final T key, final R value) {
  return new MapEntry<>(key, value);
}
jodd.util.collectionMapEntry

Javadoc

Default Map.Entry implementation. Both key and the value can be modified.

Most used methods

  • <init>
  • createUnmodifiable
  • create
  • equals
  • setValue

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • Menu (java.awt)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Option (scala)
  • Best plugins for Eclipse
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