/** Creates a new pair containing the given objects in order. */ public static <A,B> Pair<A,B> of(A first, B second) { return new Pair<A,B>(first, second); }
/** Creates a new pair containing the given objects in order. */ public static <A,B> Pair<A,B> of(A first, B second) { return new Pair<A,B>(first, second); }
/** Creates a new pair containing the given objects in order. */ public static <A,B> Pair<A,B> of(A first, B second) { return new Pair<A,B>(first, second); }
/** * Adds a string of xml as a child to this element. * * <p>Unlike addText(String), the string provided will not be escaped. If the * given String is not well formed, then this element may not be well formed. * </p> */ public XmlElement addXml(String xml) { Preconditions.checkNotNull(xml); children.add(new Pair<Object, ChildType>(xml, ChildType.XML)); return this; }
/** * Adds a child XmlElement to this one. * * <p>Children appear in the order in which they are added in the xml output. * </p> */ public XmlElement addElement(XmlElement child) { Preconditions.checkNotNull(child); children.add(new Pair<Object, ChildType>(child, ChildType.ELEMENT)); return this; }
/** * Adds a plain text child to this element. The String given is * automatically converted to xml-safe characters. * * <p>Children appear in the order in which they are added in the xml output. * </p> */ public XmlElement addText(String text) { Preconditions.checkNotNull(text); children.add(new Pair<Object, ChildType>(StringEscapeUtils.escapeXml(text), ChildType.TEXT)); return this; }
new Pair<String,String>(extDescription.getNamespace().getUri(), extDescription.getLocalName());
new Pair<String,String>(extDescription.getNamespace().getUri(), extDescription.getLocalName());
new Pair<String,String>(extDescription.getNamespace().getUri(), extDescription.getLocalName());