*
* @author Toni Kalajainen <toni.kalajainen@vtt.fi>
*/\r
-@SuppressWarnings("all")
+@SuppressWarnings({"rawtypes", "unchecked"})\r
public class HashSetBinding extends MapBinding {
public HashSetBinding(MapType mapType, Binding elementBinding) {
super(new MapType(elementBinding.type(), RecordType.VOID_TYPE), elementBinding, VoidBinding.VOID_BINDING);
}
- @SuppressWarnings("unchecked")
@Override
public void clear(Object set) throws BindingException {
Set _set = (Set) set;
keys.addAll(s);
}
\r
- @SuppressWarnings("unchecked")\r
@Override\r
public int count(Object src, Object from, boolean fromInclusive,\r
Object end, boolean endInclusive) throws BindingException {\r
s.add(key);
}
- @SuppressWarnings("unchecked")
Object getComparableKey(Object set, Object key) {
// if (keyIsComparable) return key;
_set.addAll(from);
}
- @SuppressWarnings("unchecked")
@Override
public void putAll(Object setTo, Map from) throws BindingException {
Set<Object> s = (Set<Object>) setTo;
- Binding kb = getKeyBinding();
for (Entry<Object, Object> e : (Set<Entry<Object, Object>>) from.entrySet()) {
Object k = getComparableKey(s, e.getKey());
s.remove(k);