Exemple #1
0
 @SuppressWarnings("unchecked")
 public void init() {
   if (initialized) {
     return;
   }
   initialized = true;
   if (visitor == null) {
     return;
   }
   if (visitor instanceof InitVisitor) {
     for (V ax : (Set<V>) i.getValues(i.getAxiomsByType(), type)) {
       K key = ax.accept((InitVisitor<K>) visitor);
       if (key != null) {
         map.put(key, ax);
       }
     }
   } else {
     for (V ax : (Set<V>) i.getValues(i.getAxiomsByType(), type)) {
       Collection<K> keys = ax.accept((InitCollectionVisitor<K>) visitor);
       for (K key : keys) {
         map.put(key, ax);
       }
     }
   }
 }
Exemple #2
0
 public boolean put(K key, V value) {
   return map.put(key, value);
 }