Package com.linkedin.data.template

Examples of com.linkedin.data.template.IntegerMap


    result = test("{\"key1\": 1, \"key2\": 2}", IntegerMap.class);
    final Map<String, Integer> integerFixture = new HashMap<String, Integer>();
    integerFixture.put("key1", 1);
    integerFixture.put("key2", 2);
    Assert.assertEquals(result, new IntegerMap(integerFixture));
    Assert.assertSame(result.getClass(), IntegerMap.class);

    result = test("{\"key1\": 2, \"key2\": 3}", LongMap.class);
    final Map<String, Long> longFixture = new HashMap<String, Long>();
    longFixture.put("key1", 2L);
View Full Code Here


    record.setDoubleRefMap(doubleMap);
    doubleMap = record.getDoubleRefMap();
    assertEquals(doubleMap.schema(), DataTemplateUtil.getSchema(DoubleMap.class));
    assertNotEquals(recordDataSchema.getField("doubleRefMap").getType(), doubleMap.schema());

    IntegerMap intMap = new IntegerMap();
    record.setIntMap(intMap);
    intMap = record.getIntMap();
    assertEquals(intMap.schema(), DataTemplateUtil.getSchema(IntegerMap.class));
    assertNotEquals(recordDataSchema.getField("intMap").getType(), intMap.schema());

    record.setIntRefMap(intMap);
    intMap = record.getIntRefMap();
    assertEquals(intMap.schema(), DataTemplateUtil.getSchema(IntegerMap.class));
    assertNotEquals(recordDataSchema.getField("intRefMap").getType(), intMap.schema());

    assertNotEquals(recordDataSchema.getField("intMap").getType(), recordDataSchema.getField("intRefMap").getType());
  }
View Full Code Here

  }

  @Action(name = "IntMapFunc", returnTyperef=IntMapRef.class)
  public IntegerMap IntMapFunc(@ActionParam(value="arg1", typeref=IntMapRef.class) IntegerMap arg1)
  {
    return new IntegerMap();
  }
View Full Code Here

TOP

Related Classes of com.linkedin.data.template.IntegerMap

Copyright © 2018 www.massapicom. 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.