Bundle getDoubleArray - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Bundle getDoubleArray method.

This code example shows how to use the following methods:getBoolean, getBooleanArray, getChar, getCharArray, getDouble
        assertEquals(Float.valueOf(7), Float.valueOf(bundle.getFloat("bar", 7)));
    } 
 
    @Test 
    public void testGetOfWrongType() { 
        bundle.putFloat("foo", 5f);
        assertEquals(0, bundle.getChar("foo"));
        assertEquals(null, bundle.getCharArray("foo"));
        assertEquals(0, bundle.getInt("foo"));
        assertEquals(null, bundle.getIntArray("foo"));
        assertEquals(null, bundle.getIntegerArrayList("foo"));
        assertEquals(0, bundle.getShort("foo"));
        assertEquals(null, bundle.getShortArray("foo"));
        assertEquals(false, bundle.getBoolean("foo"));
        assertEquals(null, bundle.getBooleanArray("foo"));
        assertEquals(0, bundle.getLong("foo"));
        assertEquals(null, bundle.getLongArray("foo"));
        assertEquals(null, bundle.getFloatArray("foo"));
        assertEquals(0, bundle.getDouble("foo"), 0.005);
        assertEquals(null, bundle.getDoubleArray("foo"));

0
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getBoolean, getBooleanArray, getChar, getCharArray, getDouble
    assertEquals(Float.valueOf(7), Float.valueOf(bundle.getFloat("bar", 7)));
  } 
 
  @Test 
  public void testGetOfWrongType() { 
    bundle.putFloat("foo", 5f);
    assertEquals(0, bundle.getChar("foo"));
    assertEquals(null, bundle.getCharArray("foo"));
    assertEquals(0, bundle.getInt("foo"));
    assertEquals(null, bundle.getIntArray("foo"));
    assertEquals(null, bundle.getIntegerArrayList("foo"));
    assertEquals(0, bundle.getShort("foo"));
    assertEquals(null, bundle.getShortArray("foo"));
    assertEquals(false, bundle.getBoolean("foo"));
    assertEquals(null, bundle.getBooleanArray("foo"));
    assertEquals(0, bundle.getLong("foo"));
    assertEquals(null, bundle.getLongArray("foo"));
    assertEquals(null, bundle.getFloatArray("foo"));
    assertEquals(0, bundle.getDouble("foo"), 0.005);
    assertEquals(null, bundle.getDoubleArray("foo"));

0
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Bundle getDoubleArray Questions & Answers:

getDoubleArray Method Overview
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
See Code Examples for other Android Bundle Methods: