test_class.declarator: s1 = "String1"
test_class.modifier: private static final
test_class.original_string: private static final String s1 = "String1";
test_class.type: String
test_class.var_name: s1
test_class.declarator: s2 = "zwo"
test_class.modifier: private static final
test_class.original_string: private static final String s2 = "zwo";
test_class.type: String
test_class.var_name: s2
test_class.declarator: s3 = "Nummer tres"
test_class.modifier: private static final
test_class.original_string: private static final String s3 = "Nummer tres";
test_class.type: String
test_class.var_name: s3
test_class.declarator: s4 = "viere"
test_class.modifier: private static final
test_class.original_string: private static final String s4 = "viere";
test_class.type: String
test_class.var_name: s4
test_class.declarator: s5 = "zwo"
test_class.modifier: private static final
test_class.original_string: private static final String s5 = "zwo";
test_class.type: String
test_class.var_name: s5
test_class.file: ontopia-navigator/src/test/java/net/ontopia/topicmaps/nav2/utils/HistoryMapTest.java
test_class.identifier: HistoryMapTest
test_case.body: @Test
    public void testAdd() {
      HistoryMap hm = makeHistoryMap();
      Assert.assertTrue("Expected other HistoryMap result, got " + hm,
                 (hm.size() == 3) &&
                 hm.containsValue(s1) && hm.containsValue(s2) && hm.containsValue(s3));
      hm.add(s4);
      Assert.assertTrue("First should be gone, but got" + hm,
                 (hm.size() == 3) &&
                 hm.containsValue(s2) && hm.containsValue(s3) && hm.containsValue(s4));
    }
test_case.class_method_signature: HistoryMapTest.testAdd()
test_case.full_signature: @Test public void testAdd()
test_case.identifier: testAdd
test_case.invocations: makeHistoryMap assertTrue size containsValue containsValue containsValue add assertTrue size containsValue containsValue containsValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAdd()
focal_class.declarator: maxEntries
focal_class.modifier: protected
focal_class.original_string: protected int maxEntries;
focal_class.type: int
focal_class.var_name: maxEntries
focal_class.declarator: suppressDuplicates
focal_class.modifier: protected
focal_class.original_string: protected boolean suppressDuplicates;
focal_class.type: boolean
focal_class.var_name: suppressDuplicates
focal_class.declarator: counter
focal_class.modifier: private
focal_class.original_string: private int counter;
focal_class.type: int
focal_class.var_name: counter
focal_class.declarator: log = LoggerFactory.getLogger(HistoryMap.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(HistoryMap.class.getName());
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: ontopia-navigator/src/main/java/net/ontopia/topicmaps/nav2/utils/HistoryMap.java
focal_class.identifier: HistoryMap
focal_class.class_method_signature: HistoryMap.HistoryMap()
focal_class.full_signature: public  HistoryMap()
focal_class.identifier: HistoryMap
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  HistoryMap()
focal_class.class_method_signature: HistoryMap.HistoryMap(int maxEntries, boolean suppressDuplicates)
focal_class.full_signature: public  HistoryMap(int maxEntries, boolean suppressDuplicates)
focal_class.identifier: HistoryMap
focal_class.modifiers: public
focal_class.parameters: (int maxEntries, boolean suppressDuplicates)
focal_class.signature:  HistoryMap(int maxEntries, boolean suppressDuplicates)
focal_class.class_method_signature: HistoryMap.getMaxEntries()
focal_class.full_signature: public int getMaxEntries()
focal_class.identifier: getMaxEntries
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxEntries()
focal_class.class_method_signature: HistoryMap.doesSuppressDuplicates()
focal_class.full_signature: public boolean doesSuppressDuplicates()
focal_class.identifier: doesSuppressDuplicates
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean doesSuppressDuplicates()
focal_class.class_method_signature: HistoryMap.add(T obj)
focal_class.full_signature: public void add(T obj)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (T obj)
focal_class.return: void
focal_class.signature: void add(T obj)
focal_class.class_method_signature: HistoryMap.removeEntry(T obj)
focal_class.full_signature: public void removeEntry(T obj)
focal_class.identifier: removeEntry
focal_class.modifiers: public
focal_class.parameters: (T obj)
focal_class.return: void
focal_class.signature: void removeEntry(T obj)
focal_class.class_method_signature: HistoryMap.getEntry(int index)
focal_class.full_signature: public T getEntry(int index)
focal_class.identifier: getEntry
focal_class.modifiers: public
focal_class.parameters: (int index)
focal_class.return: T
focal_class.signature: T getEntry(int index)
focal_class.class_method_signature: HistoryMap.getEntries()
focal_class.full_signature: public Collection<T> getEntries()
focal_class.identifier: getEntries
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<T>
focal_class.signature: Collection<T> getEntries()
focal_class.class_method_signature: HistoryMap.getEntriesReverse()
focal_class.full_signature: public Collection getEntriesReverse()
focal_class.identifier: getEntriesReverse
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection
focal_class.signature: Collection getEntriesReverse()
focal_class.superclass: extends HashMap<Integer, T>
focal_method.body: public void add(T obj) {
      // do not add if object already exists
      if (suppressDuplicates && containsValue(obj))
        return;
      counter++;
      put(new Integer(counter), obj);
      if (size() >= maxEntries)
        try {
          remove(new Integer(counter - maxEntries));
        } catch (Exception e) {
          log.error("Remove of entry from historymap without success." +
                    e.getMessage());
        }
    }
focal_method.class_method_signature: HistoryMap.add(T obj)
focal_method.full_signature: public void add(T obj)
focal_method.identifier: add
focal_method.invocations: containsValue put size remove error getMessage
focal_method.modifiers: public
focal_method.parameters: (T obj)
focal_method.return: void
focal_method.signature: void add(T obj)