Package com.linkedin.data

Examples of com.linkedin.data.DataMap.clear()


      exc = e;
    }
    assertTrue(exc != null);
    assertTrue(exc instanceof ClassCastException);

    badDataMap.clear();
    badDataMap.putAll(badOutput);
    MapTemplate badWrappedMapTemplate = DataTemplateUtil.wrap(badDataMap, schema, templateClass);

    // Get bad
    for (String key : badOutput.keySet())
View Full Code Here


      assertTrue(exc != null);
      assertTrue(exc instanceof TemplateOutputCastException);
    }

    // Set returns bad
    badDataMap.clear();
    badDataMap.putAll(badOutput);
    assertEquals(badWrappedMapTemplate.size(), badOutput.size());
    for (String key : badOutput.keySet())
    {
      try
View Full Code Here

      assertTrue(exc != null);
      assertTrue(exc instanceof TemplateOutputCastException);
    }

    // Remove returns bad
    badDataMap.clear();
    badDataMap.putAll(badOutput);
    assertEquals(badWrappedMapTemplate.size(), badOutput.size());
    for (String key : badOutput.keySet())
    {
      try
View Full Code Here

      assertTrue(exc != null);
      assertTrue(exc instanceof TemplateOutputCastException);
    }

    // entrySet returns bad
    badDataMap.clear();
    badDataMap.putAll(badOutput);
    for (Map.Entry<String, E> entry : badWrappedMapTemplate.entrySet())
    {
      try
      {
View Full Code Here

    assertNull(union2.getBar());
    int lastHashCode = union2.hashCode();
    Foo.Union lastUnion = union2.clone();

    // test union set and get wrapped
    unionMap.clear();
    value = 32;
    Bar bar = new Bar();
    bar.setInt(value.intValue());
    union2.setBar(bar);
    assertFalse(union2.isNull());
View Full Code Here

  public <T extends RecordTemplate> AnyRecord setValue(T value)
  {
    DataSchema schema = value.schema();
    String key = schema.getUnionMemberKey();
    DataMap map = data();
    map.clear();
    map.put(key, value.data());
    _cachedValue = value;
    return this;
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.