Esempio n. 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);
       }
     }
   }
 }
Esempio n. 2
0
 public Set<V> getAllValues() {
   return map.getAllValues();
 }
Esempio n. 3
0
 public boolean contains(K key, V value) {
   return map.contains(key, value);
 }
Esempio n. 4
0
 public boolean containsKey(K key) {
   return map.containsKey(key);
 }
Esempio n. 5
0
 public boolean remove(K key, V value) {
   return map.remove(key, value);
 }
Esempio n. 6
0
 public boolean put(K key, V value) {
   return map.put(key, value);
 }
Esempio n. 7
0
 public boolean hasValues(K key) {
   return map.containsKey(key);
 }
Esempio n. 8
0
 public Set<V> getValues(K key) {
   return CollectionFactory.getCopyOnRequestSetFromMutableCollection(map.get(key));
 }
Esempio n. 9
0
 public Set<K> keySet() {
   return CollectionFactory.getCopyOnRequestSetFromMutableCollection(map.keySet());
 }
Esempio n. 10
0
 @Override
 public String toString() {
   return initialized + map.toString();
 }
Esempio n. 11
0
 public int size() {
   return map.size();
 }