@Override public Object valAt(Object o) { try { if (o instanceof Keyword) { return getValueByField(((Keyword) o).getName()); } else if (o instanceof String) { return getValueByField((String) o); } } catch (IllegalArgumentException ignored) { } return null; }
@Override public Object valAt(Object o) { try { if(o instanceof Keyword) { return getValueByField(((Keyword) o).getName()); } else if(o instanceof String) { return getValueByField((String) o); } } catch(IllegalArgumentException e) { } return null; }
public boolean containsKey(Object k) { if (k instanceof Keyword) return containsKey(((Keyword) k).getName()); return getMap().containsKey(k); }
public IMapEntry entryAt(Object k) { if (k instanceof Keyword) return entryAt(((Keyword) k).getName()); return getMap().entryAt(k); }
@Override public Object valAt(Object o) { if (o instanceof Keyword) { return valAt(((Keyword) o).getName()); } return getMap().valAt(o); }
@Override public Object valAt(Object o) { if(o instanceof Keyword) { return valAt(((Keyword) o).getName()); } return getMap().valAt(o); }
public IPersistentMap assocEx(Object k, Object v) { if (k instanceof Keyword) return assocEx(((Keyword) k).getName(), v); return new IndifferentAccessMap(getMap().assocEx(k, v)); }
public IPersistentMap without(Object k) { if (k instanceof Keyword) return without(((Keyword) k).getName()); return new IndifferentAccessMap(getMap().without(k)); }
public boolean containsKey(Object k) { if(k instanceof Keyword) return containsKey(((Keyword) k).getName()); return getMap().containsKey(k); }
public IMapEntry entryAt(Object k) { if(k instanceof Keyword) return entryAt(((Keyword) k).getName()); return getMap().entryAt(k); }
public IPersistentMap assoc(Object k, Object v) { if (k instanceof Keyword) return assoc(((Keyword) k).getName(), v); return new IndifferentAccessMap(getMap().assoc(k, v)); }
public IPersistentMap assoc(Object k, Object v) { if(k instanceof Keyword) return assoc(((Keyword) k).getName(), v); return new IndifferentAccessMap(getMap().assoc(k, v)); }
public IPersistentMap without(Object k) throws Exception { if(k instanceof Keyword) return without(((Keyword) k).getName()); return new IndifferentAccessMap(getMap().without(k)); }
public IPersistentMap assocEx(Object k, Object v) throws Exception { if(k instanceof Keyword) return assocEx(((Keyword) k).getName(), v); return new IndifferentAccessMap(getMap().assocEx(k, v)); }
static Event fromKeywordMap(Map<Keyword, ?> map) { Map<Keyword, ?> encodedMap = EventUtils.encodeNemesis(map); Map<String, Object> convertedMap = new HashMap<>(); EntryStream.of(encodedMap) .mapKeys(Keyword::getName) .mapValues(value -> value != null && value instanceof Keyword ? ((Keyword) value).getName() : value) .forKeyValue(convertedMap::put); return OBJECT_MAPPER.convertValue(convertedMap, Event.class); }
@Override public Object valAt(Object o) { try { if(o instanceof Keyword) { return getValueByField(((Keyword) o).getName()); } else if(o instanceof String) { return getValueByField((String) o); } } catch(IllegalArgumentException ignored) { } return null; }
@Override public Object valAt(Object o) { if(o instanceof Keyword) { return valAt(((Keyword) o).getName()); } return getMap().valAt(o); }
public boolean containsKey(Object k) { if (k instanceof Keyword) return containsKey(((Keyword) k).getName()); return getMap().containsKey(k); }
@Override public Object valAt(Object o) { if(o instanceof Keyword) { return valAt(((Keyword) o).getName()); } return getMap().valAt(o); }
public IPersistentMap without(Object k) { if (k instanceof Keyword) return without(((Keyword) k).getName()); return new IndifferentAccessMap(getMap().without(k)); }