congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Making http post requests using okhttp
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • putExtra (Intent)
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ImageIO (javax.imageio)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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