public boolean equals (Object obj) { if (!(obj instanceof ObjectSet)) return false; ObjectSet other = (ObjectSet)obj; if (other.size != size) return false; T[] keyTable = this.keyTable; for (int i = 0, n = capacity + stashSize; i < n; i++) if (keyTable[i] != null && !other.contains(keyTable[i])) return false; return true; }
public boolean equals (Object obj) { if (!(obj instanceof ObjectSet)) return false; ObjectSet other = (ObjectSet)obj; if (other.size != size) return false; T[] keyTable = this.keyTable; for (int i = 0, n = capacity + stashSize; i < n; i++) if (keyTable[i] != null && !other.contains(keyTable[i])) return false; return true; }
synchronized void injectDependencies (String parentAssetFilename, Array<AssetDescriptor> dependendAssetDescs) { ObjectSet<String> injected = this.injected; for (AssetDescriptor desc : dependendAssetDescs) { if (injected.contains(desc.fileName)) continue; // Ignore subsequent dependencies if there are duplicates. injected.add(desc.fileName); injectDependency(parentAssetFilename, desc); } injected.clear(); }
public TextureAtlas getAtlas(Texture texture){ Array<TextureAtlas> atlases = assetManager.getAll(TextureAtlas.class, new Array<TextureAtlas>()); for(TextureAtlas atlas : atlases){ if(atlas.getTextures().contains(texture)) return atlas; } return null; }
synchronized void injectDependencies (String parentAssetFilename, Array<AssetDescriptor> dependendAssetDescs) { ObjectSet<String> injected = this.injected; for (AssetDescriptor desc : dependendAssetDescs) { if (injected.contains(desc.fileName)) continue; // Ignore subsequent dependencies if there are duplicates. injected.add(desc.fileName); injectDependency(parentAssetFilename, desc); } injected.clear(); }
public TextureAtlas getAtlas(Texture texture){ Array<TextureAtlas> atlases = assetManager.getAll(TextureAtlas.class, new Array<TextureAtlas>()); for(TextureAtlas atlas : atlases){ if(atlas.getTextures().contains(texture)) return atlas; } return null; }
private void checkRequiredAttributes (StackedTask<E> stackedTask) { // Check the minimum number of children Entries<String, AttrInfo> entries = stackedTask.metadata.attributes.iterator(); while (entries.hasNext()) { Entry<String, AttrInfo> entry = entries.next(); if (entry.value.required && !encounteredAttributes.contains(entry.key)) throw stackedTaskException(stackedTask, "missing required attribute '" + entry.key + "'"); } }
public boolean equals (Object obj) { if (!(obj instanceof ObjectSet)) return false; ObjectSet other = (ObjectSet)obj; if (other.size != size) return false; T[] keyTable = this.keyTable; for (int i = 0, n = capacity + stashSize; i < n; i++) if (keyTable[i] != null && !other.contains(keyTable[i])) return false; return true; }
public boolean contains(ImageEntry image) { return imageSet.contains(image); }
public boolean add(ImageEntry image) { if (!image.fileHandle.exists()) { System.out.println(String.format( "WARNING: Input file doesn't exist: \"%s\"", image.fileHandle.path())); return false; } if (imageSet.contains(image)) { imageSet.remove(image); System.out.println(String.format( "WARNING: Region: \"%s\" is listed twice. The last added configuration will be used - \"%s\"", image.regionName, image.fileHandle.path())); } return imageSet.add(image); }
public TextureAtlas getAtlas(Texture texture){ Array<TextureAtlas> atlases = assetManager.getAll(TextureAtlas.class, new Array<TextureAtlas>()); for(TextureAtlas atlas : atlases){ if(atlas.getTextures().contains(texture)) return atlas; } return null; }
synchronized void injectDependencies (String parentAssetFilename, Array<AssetDescriptor> dependendAssetDescs) { ObjectSet<String> injected = this.injected; for (AssetDescriptor desc : dependendAssetDescs) { if (injected.contains(desc.fileName)) continue; // Ignore subsequent dependencies if there are duplicates. injected.add(desc.fileName); injectDependency(parentAssetFilename, desc); } injected.clear(); }
private void checkRequiredAttributes (StackedTask<E> stackedTask) { // Check the minimum number of children Entries<String, AttrInfo> entries = stackedTask.metadata.attributes.iterator(); while (entries.hasNext()) { Entry<String, AttrInfo> entry = entries.next(); if (entry.value.required && !encounteredAttributes.contains(entry.key)) throw stackedTaskException(stackedTask, "missing required attribute '" + entry.key + "'"); } }