Package clojure.lang

Examples of clojure.lang.ITransientMap.persistent()


        jp.nextToken();
        Object key = keywords ? Keyword.intern(keyStr) : keyStr;
        map = map.assoc(key, parse(jp, false, keywords, eofValue));
        jp.nextToken();
      }
      return map.persistent();
    case START_ARRAY:
      ITransientCollection vec = PersistentVector.EMPTY.asTransient();
      jp.nextToken();
      while (jp.getCurrentToken() != JsonToken.END_ARRAY) {
        vec = vec.conj(parse(jp, false, keywords, eofValue));
View Full Code Here


              (PersistentProtocolBufferMap)fromProtoValue(field, iterator.next());
            Object k = v.valAt(map_field_by);
            PersistentProtocolBufferMap existing = (PersistentProtocolBufferMap)map.valAt(k);
            map = map.assoc(k, def.mapValue(field, existing, v));
          }
          return map.persistent();
        } else if (options.getExtension(Extensions.counter)) {
          Object count = iterator.next();
          while (iterator.hasNext()) {
            count = Numbers.add(count, iterator.next());
          }
View Full Code Here

              map = map.assoc(k, ((IPersistentCollection)existing).cons(v));
            } else {
              map = map.assoc(k, v);
            }
          }
          return map.persistent();
        } else if (options.getExtension(Extensions.set)) {
          Descriptors.Descriptor type = field.getMessageType();
          Descriptors.FieldDescriptor item_field = type.findFieldByName("item");
          Descriptors.FieldDescriptor exists_field = type.findFieldByName("exists");
View Full Code Here

                jp.nextToken();
                Object key = keywords ? Keyword.intern(keyStr) : keyStr;
                map = map.assoc(key, parse(jp, false, keywords, eofValue));
                jp.nextToken();
            }
            return map.persistent();
        case START_ARRAY:
            ITransientCollection vec = PersistentVector.EMPTY.asTransient();
            jp.nextToken();
            while (jp.getCurrentToken() != JsonToken.END_ARRAY) {
                vec = vec.conj(parse(jp, false, keywords, eofValue));
View Full Code Here

          m.assoc(Keyword.intern(key), Float.parseFloat(val));
        } else {
          m.assoc(Keyword.intern(key), val);
        }
      }
      return m.persistent();
    } catch (Exception e) {
      System.err.println("Riemann-jvm-profiler agent takes a list of comma-separated k=v pairs for riemann.jvm-profiler/start. For instance, -javaagent:riemann-jvm-profiler.jar=host=my.riemann.host,port=5556,dt=10");
      System.exit(1);
      return null; // unreachable
    } finally {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.