Package com.ebay.erl.mobius.core.collection

Examples of com.ebay.erl.mobius.core.collection.CaseInsensitiveTreeMap


  @Override
  protected Void on_string_map()
    throws IOException
  {
    int map_size = in.readInt();
    CaseInsensitiveTreeMap map = new CaseInsensitiveTreeMap();   
    for( int j=0;j<map_size;j++ )
    {
      String k = Text.readString(in);
      String v = Text.readString(in);
      map.put(k, v);
    }
    this.values.add(map);
    return null;
  }
View Full Code Here


    t2.put("C1", false);
    assertTrue(t1.compareTo(t2)>0);
    assertTrue(t2.compareTo(t1)<0);
   
    // comparing string map
    CaseInsensitiveTreeMap m1 = new CaseInsensitiveTreeMap();
    CaseInsensitiveTreeMap m2 = new CaseInsensitiveTreeMap();
    t1.put("C1", m1);
    t2.put("C1", m2);
    assertTrue(t1.compareTo(t2)==0);
   
    m1.put("K1", "V1");
    assertTrue(t1.compareTo(t2)>0); // m1 is not empty, m2 is empty
   
    m2.put("K1", "V1");
    assertTrue(t1.compareTo(t2)==0);// m1 and m2 both are not empty and same value
   
    m1.put("K1", "V2");
    assertTrue(t1.compareTo(t2)>0);// m1 m2 has same key but different value
   
View Full Code Here

    t.put("C2", 1.2F);
    t.put("C3", 1.3D);
    t.put("C4", 1L);
    t.put("C5", "s5");
   
    CaseInsensitiveTreeMap m = new CaseInsensitiveTreeMap();
    m.put("k1", "v1");
    m.put("k2", "v2");
   
    t.put("C6", m);
   
    Text txt = new Text();
    txt.set("hello");
View Full Code Here

  }
 
  public static CaseInsensitiveTreeMap deseralizeTreeMap(DataInput in)
    throws IOException
  {
    CaseInsensitiveTreeMap map = new CaseInsensitiveTreeMap();
    int keys_nbr = in.readInt();
    for( int i=0;i<keys_nbr;i++ )
    {
      map.put(in.readUTF(), in.readUTF());
    }
    return map;
  }
View Full Code Here

TOP

Related Classes of com.ebay.erl.mobius.core.collection.CaseInsensitiveTreeMap

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.