|
Revision 3291, 1.6 KB
(checked in by dr2chase, 11 months ago)
|
|
[repository, ffi] Generated APIs now use proper import syntax, seem to pass static checking
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | package com.sun.fortress.useful; |
|---|
| 19 | |
|---|
| 20 | import java.util.Collection; |
|---|
| 21 | import java.util.HashMap; |
|---|
| 22 | |
|---|
| 23 | public class MapOfMapOfSet<K, L, T> extends HashMap<K, IMultiMap<L, T>> { |
|---|
| 24 | |
|---|
| 25 | public IMultiMap<L,T> putItem(K k, L l, T t) { |
|---|
| 26 | IMultiMap<L, T> map = get(k); |
|---|
| 27 | if (map == null) { |
|---|
| 28 | map = new MultiMap<L,T>(); |
|---|
| 29 | put(k,map); |
|---|
| 30 | } |
|---|
| 31 | map.putItem(l, t); |
|---|
| 32 | return map; |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | public IMultiMap<L,T> putItems(K k, L l, Collection<T> s) { |
|---|
| 36 | IMultiMap<L, T> map = get(k); |
|---|
| 37 | if (map == null) { |
|---|
| 38 | map = new MultiMap<L,T>(); |
|---|
| 39 | put(k,map); |
|---|
| 40 | } |
|---|
| 41 | map.putItems(l, s); |
|---|
| 42 | return map; |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | public IMultiMap<L,T> putItem(K k, L l) { |
|---|
| 47 | IMultiMap<L, T> map = get(k); |
|---|
| 48 | if (map == null) { |
|---|
| 49 | map = new MultiMap<L,T>(); |
|---|
| 50 | put(k,map); |
|---|
| 51 | } |
|---|
| 52 | map.putKey(l); |
|---|
| 53 | return map; |
|---|
| 54 | } |
|---|
| 55 | |
|---|
| 56 | } |
|---|