/** @return iterator for the property names */ public Iterator<String> getKeys () { return properties.keys(); }
/** Sets the value of all localized strings to String placeholder so hardcoded, unlocalized values can be easily spotted. * The I18NBundle won't be able to reset values after calling debug and should only be using during testing. * * @param placeholder */ public void debug(String placeholder) { ObjectMap.Keys<String> keys = properties.keys(); if(keys == null) return; for(String s : keys) { properties.put(s, placeholder); } } }
@Override public Map<String, ?> get () { HashMap<String, Object> map = new HashMap<String, Object>(); for (String key : values.keys()) { map.put(key, values.get(key)); } return map; }
@Override public String toString () { stringBuilder.setLength(0); for (final ObjectMap.Entry<String, ObjectMap<String, String>> entry : snippets.entries()) { stringBuilder.append(entry.key).append(": {"); for (final String snipname : entry.value.keys()) stringBuilder.append(snipname).append(", "); stringBuilder.append("}\n"); } return stringBuilder.toString(); } }
public static String getManagedStatus () { StringBuilder builder = new StringBuilder(); int i = 0; builder.append("Managed shaders/app: { "); for (Application app : shaders.keys()) { builder.append(shaders.get(app).size); builder.append(" "); } builder.append("}"); return builder.toString(); }
public static String getManagedStatus () { StringBuilder builder = new StringBuilder(); int i = 0; builder.append("Managed shaders/app: { "); for (Application app : shaders.keys()) { builder.append(shaders.get(app).size); builder.append(" "); } builder.append("}"); return builder.toString(); }
@Override public Map<String, ?> get () { HashMap<String, Object> map = new HashMap<String, Object>(); for (String key : values.keys()) { map.put(key, values.get(key)); } return map; }
/** Sets the value of all localized strings to String placeholder so hardcoded, unlocalized values can be easily spotted. * The I18NBundle won't be able to reset values after calling debug and should only be using during testing. * * @param placeholder */ public void debug(String placeholder) { ObjectMap.Keys<String> keys = properties.keys(); if(keys == null) return; for(String s : keys) { properties.put(s, placeholder); } } }
/** @param asset the asset * @return the filename of the asset or null */ public synchronized <T> String getAssetFileName (T asset) { for (Class assetType : assets.keys()) { ObjectMap<String, RefCountedContainer> assetsByType = assets.get(assetType); for (String fileName : assetsByType.keys()) { T otherAsset = (T)assetsByType.get(fileName).getObject(Object.class); if (otherAsset == asset || asset.equals(otherAsset)) return fileName; } } return null; }
/** @param asset the asset * @return the filename of the asset or null */ public synchronized <T> String getAssetFileName (T asset) { for (Class assetType : assets.keys()) { ObjectMap<String, RefCountedContainer> assetsByType = assets.get(assetType); for (String fileName : assetsByType.keys()) { T otherAsset = (T)assetsByType.get(fileName).getObject(Object.class); if (otherAsset == asset || asset.equals(otherAsset)) return fileName; } } return null; }
public FileHandle[] list (String url, FilenameFilter filter) { Array<FileHandle> files = new Array<FileHandle>(); for (String path : texts.keys()) { if (isChild(path, url) && filter.accept(new File(url), path.substring(url.length() + 1))) { files.add(new GwtFileHandle(this, path, FileType.Internal)); } } FileHandle[] list = new FileHandle[files.size]; System.arraycopy(files.items, 0, list, 0, list.length); return list; }
public FileHandle[] list (String url, FilenameFilter filter) { Array<FileHandle> files = new Array<FileHandle>(); for (String path : texts.keys()) { if (isChild(path, url) && filter.accept(new File(url), path.substring(url.length() + 1))) { files.add(new GwtFileHandle(this, path, FileType.Internal)); } } FileHandle[] list = new FileHandle[files.size]; System.arraycopy(files.items, 0, list, 0, list.length); return list; }
/** @param asset the asset * @return whether the asset is contained in this manager */ public synchronized <T> boolean containsAsset (T asset) { ObjectMap<String, RefCountedContainer> assetsByType = assets.get(asset.getClass()); if (assetsByType == null) return false; for (String fileName : assetsByType.keys()) { T otherAsset = (T)assetsByType.get(fileName).getObject(Object.class); if (otherAsset == asset || asset.equals(otherAsset)) return true; } return false; }
public FileHandle[] list (String url, FileFilter filter) { Array<FileHandle> files = new Array<FileHandle>(); for (String path : texts.keys()) { if (isChild(path, url) && filter.accept(new File(path))) { files.add(new GwtFileHandle(this, path, FileType.Internal)); } } FileHandle[] list = new FileHandle[files.size]; System.arraycopy(files.items, 0, list, 0, list.length); return list; }
/** @param asset the asset * @return whether the asset is contained in this manager */ public synchronized <T> boolean containsAsset (T asset) { ObjectMap<String, RefCountedContainer> assetsByType = assets.get(asset.getClass()); if (assetsByType == null) return false; for (String fileName : assetsByType.keys()) { T otherAsset = (T)assetsByType.get(fileName).getObject(Object.class); if (otherAsset == asset || asset.equals(otherAsset)) return true; } return false; }
public FileHandle[] list (String url, FileFilter filter) { Array<FileHandle> files = new Array<FileHandle>(); for (String path : texts.keys()) { if (isChild(path, url) && filter.accept(new File(path))) { files.add(new GwtFileHandle(this, path, FileType.Internal)); } } FileHandle[] list = new FileHandle[files.size]; System.arraycopy(files.items, 0, list, 0, list.length); return list; }
public FileHandle[] list (String url, String suffix) { Array<FileHandle> files = new Array<FileHandle>(); for (String path : texts.keys()) { if (isChild(path, url) && path.endsWith(suffix)) { files.add(new GwtFileHandle(this, path, FileType.Internal)); } } FileHandle[] list = new FileHandle[files.size]; System.arraycopy(files.items, 0, list, 0, list.length); return list; }
public FileHandle[] list (String url, String suffix) { Array<FileHandle> files = new Array<FileHandle>(); for (String path : texts.keys()) { if (isChild(path, url) && path.endsWith(suffix)) { files.add(new GwtFileHandle(this, path, FileType.Internal)); } } FileHandle[] list = new FileHandle[files.size]; System.arraycopy(files.items, 0, list, 0, list.length); return list; }
public FileHandle[] list (String url) { Array<FileHandle> files = new Array<FileHandle>(); for (String path : texts.keys()) { if (isChild(path, url)) { files.add(new GwtFileHandle(this, path, FileType.Internal)); } } FileHandle[] list = new FileHandle[files.size]; System.arraycopy(files.items, 0, list, 0, list.length); return list; }
public FileHandle[] list (String url) { Array<FileHandle> files = new Array<FileHandle>(); for (String path : texts.keys()) { if (isChild(path, url)) { files.add(new GwtFileHandle(this, path, FileType.Internal)); } } FileHandle[] list = new FileHandle[files.size]; System.arraycopy(files.items, 0, list, 0, list.length); return list; }