本文整理汇总了Java中com.badlogic.gdx.utils.ObjectMap.putAll方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectMap.putAll方法的具体用法?Java ObjectMap.putAll怎么用?Java ObjectMap.putAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.utils.ObjectMap
的用法示例。
在下文中一共展示了ObjectMap.putAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadAsync
import com.badlogic.gdx.utils.ObjectMap; //导入方法依赖的package包/类
@Override public void loadAsync(AssetManager manager, String fileName, FileHandle file, ThesaurusLoader.ThesaurusParameter parameter) {
Constructor constructor = new Constructor(ThesaurusData.class);
Yaml yaml = new Yaml(constructor);
ObjectMap<String, ThesaurusData> data = new ObjectMap<String, ThesaurusData>();
for (Object o : yaml.loadAll(resolve(fileName).read())) {
ThesaurusData description = (ThesaurusData) o;
data.put(description.key, description);
}
if (parameter != null && parameter.other.length > 0) {
for (String depName : parameter.other) {
Thesaurus dep = manager.get(depName);
data.putAll(dep.data);
}
}
thesaurus = new Thesaurus(data);
}
示例2: parse
import com.badlogic.gdx.utils.ObjectMap; //导入方法依赖的package包/类
public static Array<TextPiece> parse(String input) {
Array<TextPiece> pieces = new Array<>(true, 16);
ObjectMap<TextParam, String> current = new ObjectMap<>();
for (String piece : separate(input)) {
if (CATCH_PATTERN.matcher(piece).matches()) {
current.putAll(parseMatches(piece));
} else {
pieces.add(TextPiece.of(new ObjectMap<>(current), piece));
}
}
return pieces;
}
示例3: getHashes
import com.badlogic.gdx.utils.ObjectMap; //导入方法依赖的package包/类
public static ObjectMap<String, String> getHashes (FileHandle basePath, FileHandle path) {
ObjectMap<String, String> objectMap = new ObjectMap<String, String>();
for (FileHandle file : path.list()) {
if (!file.isDirectory())
objectMap.put(file.path().replace(basePath.path() + "/", ""), getHash(file));
else
objectMap.putAll(getHashes(basePath, file));
}
return objectMap;
}