public void setUp() {
    Setting animalDog = new SettingImpl("animal");
    animalDog.setValue("dog");
    animalDog.setIndex(0);

    Setting animalDogDupe = new SettingImpl("animal");
    animalDogDupe.setValue("dog");
    animalDogDupe.setIndex(1);

    Setting animalCat = new SettingImpl("animal");
    animalCat.setValue("cat");
    animalCat.setIndex(2);

    SettingMap map1 = new SettingMap();
    map1.put("animal", animalDog);
    uniqueMap1 = new EquivalentSettingMapWrapper(map1);

    SettingMap map2 = new SettingMap();
    map2.put("animal", animalCat);
    uniqueMap2 = new EquivalentSettingMapWrapper(map2);

    SettingMap map3 = new SettingMap();
    map3.put("animal", animalDogDupe);
    uniqueMap3 = new EquivalentSettingMapWrapper(map3);
  }
 private Setting cursorToSetting(Cursor cursor) {
   Setting setting = new Setting();
   setting.setId(cursor.getInt(0));
   setting.setItem(cursor.getString(1));
   setting.setValue(cursor.getString(2));
   return setting;
 }
Exemplo n.º 3
0
 /**
  * Mutator for this setting.
  *
  * @param bool the <tt>boolean</tt> to store
  */
 public void setValue(boolean bool) {
   super.setValue(String.valueOf(bool));
 }
Exemplo n.º 4
0
 /**
  * Mutator for this setting.
  *
  * @param str the <tt>String</tt> to store
  */
 public void setValue(String str) {
   super.setValue(str);
 }