/** * Creates a CompoundMap using the same element ordering rules as in the given CompoundMap.<br> <br> The map is initialised using the values given in the CompoundMap. * * @param initial the initial values for the CompoundMap */ public CompoundMap(CompoundMap initial) { this(initial.values(), initial.sort, initial.reverse); }
/** * Creates a CompoundMap using the same element ordering rules as in the given CompoundMap.<br> <br> The map is initialised using the values given in the CompoundMap. * * @param initial the initial values for the CompoundMap */ public CompoundMap(CompoundMap initial) { this(initial.values(), initial.sort, initial.reverse); }
/** * Creates a CompoundMap using the same element ordering rules as in the given CompoundMap.<br> <br> The map is initialised using the values given in the CompoundMap. * * @param initial the initial values for the CompoundMap */ public CompoundMap(CompoundMap initial) { this(initial.values(), initial.sort, initial.reverse); }
@Override public Iterator<Tag<?>> iterator() { return values().iterator(); }
@Override public Iterator<Tag<?>> iterator() { return values().iterator(); }
@Override public Iterator<Tag<?>> iterator() { return values().iterator(); }
@Override public String toString() { String name = getName(); String append = ""; if (name != null && !name.equals("")) { append = "(\"" + this.getName() + "\")"; } StringBuilder bldr = new StringBuilder(); bldr.append("TAG_Compound").append(append).append(": ").append(value.size()).append(" entries\r\n{\r\n"); for (Tag entry : value.values()) { bldr.append(" ").append(entry.toString().replaceAll("\r\n", "\r\n ")).append("\r\n"); } bldr.append("}"); return bldr.toString(); }
@Override public String toString() { String name = getName(); String append = ""; if (name != null && !name.equals("")) { append = "(\"" + this.getName() + "\")"; } StringBuilder bldr = new StringBuilder(); bldr.append("TAG_Compound").append(append).append(": ").append(value.size()).append(" entries\r\n{\r\n"); for (Tag entry : value.values()) { bldr.append(" ").append(entry.toString().replaceAll("\r\n", "\r\n ")).append("\r\n"); } bldr.append("}"); return bldr.toString(); }
@Override public String toString() { String name = getName(); String append = ""; if (name != null && !name.equals("")) { append = "(\"" + this.getName() + "\")"; } StringBuilder bldr = new StringBuilder(); bldr.append("TAG_Compound").append(append).append(": ").append(value.size()).append(" entries\r\n{\r\n"); for (Tag entry : value.values()) { bldr.append(" ").append(entry.toString().replaceAll("\r\n", "\r\n ")).append("\r\n"); } bldr.append("}"); return bldr.toString(); }
private static DefaultMutableTreeNode getNode(CompoundTag tag) { CompoundMap map = tag.getValue(); DefaultMutableTreeNode root = new DefaultMutableTreeNode(tag.getName() + " [Map]"); for (Tag<?> t : map.values()) { DefaultMutableTreeNode child = getNode(t); root.add(child); } return root; }
private static DefaultMutableTreeNode getNode(CompoundTag tag) { CompoundMap map = tag.getValue(); DefaultMutableTreeNode root = new DefaultMutableTreeNode(tag.getName() + " [Map]"); for (Tag<?> t : map.values()) { DefaultMutableTreeNode child = getNode(t); root.add(child); } return root; }
private static DefaultMutableTreeNode getNode(CompoundTag tag) { CompoundMap map = tag.getValue(); DefaultMutableTreeNode root = new DefaultMutableTreeNode(tag.getName() + " [Map]"); for (Tag<?> t : map.values()) { DefaultMutableTreeNode child = getNode(t); root.add(child); } return root; }
/** * Writes a {@code TAG_Compound} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeCompoundTagPayload(CompoundTag tag) throws IOException { for (Tag<?> childTag : tag.getValue().values()) { writeTag(childTag); } os.writeByte(TagType.TAG_END.getId()); // end tag - better way? }
/** * Writes a {@code TAG_Compound} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeCompoundTagPayload(CompoundTag tag) throws IOException { for (Tag<?> childTag : tag.getValue().values()) { writeTag(childTag); } os.writeByte(TagType.TAG_END.getId()); // end tag - better way? }
/** * Writes a {@code TAG_Compound} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeCompoundTagPayload(CompoundTag tag) throws IOException { for (Tag<?> childTag : tag.getValue().values()) { writeTag(childTag); } os.writeByte(TagType.TAG_END.getId()); // end tag - better way? }