懒加载一个词典

@param key
@param path
14467
public static void putLibrary(String key, String path) {
        if (key.startsWith(DicLibrary.DEFAULT)) {
            DicLibrary.put(key, path);
        } else if (key.startsWith(StopLibrary.DEFAULT)) {
            StopLibrary.put(key, path);
        } else if (key.startsWith(SynonymsLibrary.DEFAULT)) {
            SynonymsLibrary.put(key, path);
        } else if (key.startsWith(AmbiguityLibrary.DEFAULT)) {
            AmbiguityLibrary.put(key, path);
        } else if (key.startsWith(CrfLibrary.DEFAULT)) {
            CrfLibrary.put(key, path);
        } else {
            throw new LibraryException(key + " type err must start with dic,stop,ambiguity,synonyms");
        }
        ENV.put(key, path);
    }
284988
public void pushNestedPath(final String subPath, final String key) {
        final String canonicalPath = normalizePath(subPath);
        ArgUtils.notEmpty(subPath, "subPath");
        ArgUtils.notEmpty(key, "key");
        
        pushNestedPath(String.format("%s[%s]", canonicalPath, key));
    }
397407
public void remove(String key)
    {
        BaseNode branch = this;
        char[] chars = key.toCharArray();
        for (int i = 0; i < chars.length - 1; ++i)
        {
            if (branch == null) return;
            branch = branch.getChild(chars[i]);
        }
        if (branch == null) return;
        // 最后一个字设为undefined
        if (branch.addChild(new Node(chars[chars.length - 1], Status.UNDEFINED_0, value)))
        {
            --size;
        }
    }
667794
public void setPath( String path )
    {
        // Note that an empty path is OK
        if ( path == null )
        {
            _path = null;
            setQuery( null );
            setFragment( null );
        }
        else
        {
            _path = path;
            _opaque = false;
            setSchemeSpecificPart( null );
        }
    }
167966
public static void addEntry(final File zip, final String path, final byte[] bytes) {
    operateInPlace(zip, new InPlaceAction() {
      public boolean act(File tmpFile) {
        addEntry(zip, path, bytes, tmpFile);
        return true;
      }
    });
  }
771579
public void store(Path path, String keyStorePassword) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {
		OutputStream os = this.fs.create(path, true);
		this.keystore.store(os,keyStorePassword.toCharArray());
		if (os!=null) {
			os.close();
		}
	}
574105
private void registerPath(Path path, int maxDepth) {
		try {
			final WatchKey key = path.register(watchService, ArrayUtil.isEmpty(this.events) ? EVENTS_ALL : this.events);
			watchKeyPathMap.put(key, path);
			if(maxDepth > 1) {
				//遍历所有子目录并加入监听
				Files.walkFileTree(path, EnumSet.noneOf(FileVisitOption.class), maxDepth, new SimpleFileVisitor<Path>(){
					@Override
					public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
						registerPath(dir, 0);//继续添加目录
						return super.postVisitDirectory(dir, exc);
					}
				});
			}
		} catch (IOException e) {
			if(e instanceof AccessDeniedException) {
				//对于禁止访问的目录，跳过监听
				return;
			}
			throw new WatchException(e);
		}
	}
1193397
private void queueUpload(String key, File file) {
        if (mUploadQueue == null)
            mUploadQueue = new ArrayDeque<>();
        mUploadQueue.add(new Pair<>(key, file));
    }
675816
public ThreadContextClassLoaderBuilder addPath(final String path) {

        // Check sanity
        Validate.notEmpty(path, "path");

        // Convert to an URL, and delegate.
        final URL anUrl;
        try {
            anUrl = new File(path).toURI().toURL();
        } catch (MalformedURLException e) {
            throw new IllegalArgumentException("Could not convert path [" + path + "] to an URL.", e);
        }

        // Delegate
        return addURL(anUrl);
    }
1081950
public static void reload(String key) {

        if (!MyStaticValue.ENV.containsKey(key)) { //如果变量中不存在直接删掉这个key不解释了
            remove(key);
        }

        putIfAbsent(key, MyStaticValue.ENV.get(key));

        KV<String, SmartForest<List<String>>> kv = SYNONYMS.get(key);

        init(key, kv, true);
    }
399304
def add(self, key):
        
        if key not in self._map:
            self._map[key] = link = _Link()
            root = self._root
            last = root.prev
            link.prev, link.next, link.key = last, root, key
            last.next = root.prev = weakref.proxy(link)
581469
public void setKey(String key) {

        m_key = key;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_SET_KEY_1, key));
        }
    }
121800
public void add(String key, String value)
    {
        if(key == null)
            throw new IllegalArgumentException("Null keys not allowed.");

        if(value == null)
            throw new IllegalArgumentException("Null values not allowed.");

        List<String> vals = map.get(key);
        if(vals == null)
        {
            vals = new ArrayList<String>();
            map.put(key,vals);
        }

        vals.add(value);
    }
673565
public void write(String path){

		File f = new File(path);		
		if(!f.exists()){
			f.mkdirs();
		}

		Iterator<FNLPDoc> it = docs.iterator();
		while(it.hasNext()){
			FNLPDoc doc = it.next();
			doc.write(path);
		}

	}
690639
public void put(String key, Integer value) {
		if (this.compiledStatement != null) {
			if (value == null) {
				this.compiledStatement.bindNull(compiledStatementBindIndex++);
			} else {
				compiledStatement.bindLong(compiledStatementBindIndex++, (int) value);
			}
		} else if (values != null) {
			values.put(key, value);
			return;
		}

		names.add(key);
		// values.put(key, value);
		args.add(value);
		valueType.add(ParamType.INTEGER);
	}
863536
public void setKey(String key) {
        if (!isValidParamKey(key)) {
            throw ExceptionUtils.buildRuntime("param.key", key, "key can not start with "
                + RpcConstants.HIDE_KEY_PREFIX + " and " + RpcConstants.INTERNAL_KEY_PREFIX);
        }
        this.key = key;
    }
810641
public static void putLibrary(String key, String path, Object value) {
        if (key.startsWith(DicLibrary.DEFAULT)) {
            DicLibrary.put(key, path, (Forest) value);
        } else if (key.startsWith(StopLibrary.DEFAULT)) {
            StopLibrary.put(key, path, (StopRecognition) value);
        } else if (key.startsWith(SynonymsLibrary.DEFAULT)) {
            SynonymsLibrary.put(key, path, (SmartForest) value);
        } else if (key.startsWith(AmbiguityLibrary.DEFAULT)) {
            AmbiguityLibrary.put(key, path, (Forest) value);
        } else if (key.startsWith(CrfLibrary.DEFAULT)) {
            CrfLibrary.put(key, path, (SplitWord) value);
        } else {
            throw new LibraryException(key + " type err must start with dic,stop,ambiguity,synonyms");
        }
        ENV.put(key, path);
    }