Methods Summary |
---|
public com.android.im.imps.PrimitiveElement | addChild(com.android.im.imps.PrimitiveElement child)
if (child != null) {
getChildren().add(child);
}
return child;
|
public com.android.im.imps.PrimitiveElement | addChild(java.lang.String tagName)
if (null == tagName) {
return null;
}
PrimitiveElement element = new PrimitiveElement(tagName);
getChildren().add(element);
return element;
|
public void | addChild(java.lang.String tagName, java.lang.String contents)
PrimitiveElement element = addChild(tagName);
if (null != contents) {
element.setContents(contents);
}
|
public void | addChild(java.lang.String tagName, boolean value)
addChild(tagName).setContents(value ?
ImpsConstants.TRUE : ImpsConstants.FALSE);
|
public void | addPropertyChild(java.lang.String name, java.lang.String value)
PrimitiveElement ret = addChild(ImpsTags.Property);
ret.addChild(ImpsTags.Name, name);
ret.addChild(ImpsTags.Value, value);
|
public void | addPropertyChild(java.lang.String name, boolean value)
PrimitiveElement ret = addChild(ImpsTags.Property);
ret.addChild(ImpsTags.Name, name);
ret.addChild(ImpsTags.Value, value);
|
public java.util.Map | getAttributes()
if (mAttributes == null) {
return null;
}
return Collections.unmodifiableMap(mAttributes);
|
public com.android.im.imps.PrimitiveElement | getChild(java.lang.String tagName)
for (PrimitiveElement child : getChildren()) {
if (tagName.equals(child.getTagName())) {
return child;
}
}
return null;
|
public java.lang.String | getChildContents(java.lang.String tagName)
PrimitiveElement child = getChild(tagName);
return child == null ? null : child.getContents();
|
public int | getChildCount()
if (mChildren == null || mChildren.isEmpty()) {
return 0;
} else {
return mChildren.size();
}
|
public java.util.ArrayList | getChildren()
if (mChildren == null) {
mChildren = new ArrayList<PrimitiveElement>();
}
return mChildren;
|
public java.util.ArrayList | getChildren(java.lang.String tagName)
ArrayList<PrimitiveElement> children = new ArrayList<PrimitiveElement>();
for (PrimitiveElement child : getChildren()) {
if (tagName.equals(child.getTagName())) {
children.add(child);
}
}
return children;
|
public java.lang.String | getContents()
return mContents;
|
public com.android.im.imps.PrimitiveElement | getFirstChild()
if ((mChildren == null) || mChildren.isEmpty()) {
return null;
}
return mChildren.get(0);
|
public java.lang.String | getTagName()
return mTagName;
|
public void | setAttribute(java.lang.String key, java.lang.String value)
if (key != null && value != null) {
if (mAttributes == null) {
mAttributes = new HashMap<String, String>();
}
mAttributes.put(key, value);
}
|
public void | setContents(java.lang.String contents)
mContents = contents;
|
public void | setTagName(java.lang.String tagName)
this.mTagName = tagName;
|