public SmallPrefixedNameSet(boolean nsAware, PrefixedName[] names) { mNsAware = nsAware; int len = names.length; if (len == 0) { // sanity check throw new IllegalStateException("Trying to construct empty PrefixedNameSet"); } mStrings = new String[nsAware ? (len+len) : len]; for (int out = 0, in = 0; in < len; ++in) { PrefixedName nk = names[in]; if (nsAware) { mStrings[out++] = nk.getPrefix(); } mStrings[out++] = nk.getLocalName(); } }
/** * @return True if the set contains specified name; false if not. */ public boolean contains(PrefixedName name) { int len = mStrings.length; String ln = name.getLocalName(); String[] strs = mStrings; if (mNsAware) { String prefix = name.getPrefix(); if (strs[1] == ln && strs[0] == prefix) { return true; } for (int i = 2; i < len; i += 2) { if (strs[i+1] == ln && strs[i] == prefix) { return true; } } } else { if (strs[0] == ln) { return true; } for (int i = 1; i < len; ++i) { if (strs[i] == ln) { return true; } } } return false; }
String prefix = attrName.getPrefix(); if (prefix == null || prefix.length() == 0) { // defult NS -> "" prefix = "";
String prefix = an.getPrefix(); String uri = ""; if (prefix != null && prefix.length() > 0) {
public SmallPrefixedNameSet(boolean nsAware, PrefixedName[] names) { mNsAware = nsAware; int len = names.length; if (len == 0) { // sanity check throw new IllegalStateException("Trying to construct empty PrefixedNameSet"); } mStrings = new String[nsAware ? (len+len) : len]; for (int out = 0, in = 0; in < len; ++in) { PrefixedName nk = names[in]; if (nsAware) { mStrings[out++] = nk.getPrefix(); } mStrings[out++] = nk.getLocalName(); } }
public SmallPrefixedNameSet(boolean nsAware, PrefixedName[] names) { mNsAware = nsAware; int len = names.length; if (len == 0) { // sanity check throw new IllegalStateException("Trying to construct empty PrefixedNameSet"); } mStrings = new String[nsAware ? (len+len) : len]; for (int out = 0, in = 0; in < len; ++in) { PrefixedName nk = names[in]; if (nsAware) { mStrings[out++] = nk.getPrefix(); } mStrings[out++] = nk.getLocalName(); } }
public SmallPrefixedNameSet(boolean nsAware, PrefixedName[] names) { mNsAware = nsAware; int len = names.length; if (len == 0) { // sanity check throw new IllegalStateException("Trying to construct empty PrefixedNameSet"); } mStrings = new String[nsAware ? (len+len) : len]; for (int out = 0, in = 0; in < len; ++in) { PrefixedName nk = names[in]; if (nsAware) { mStrings[out++] = nk.getPrefix(); } mStrings[out++] = nk.getLocalName(); } }
public SmallPrefixedNameSet(boolean nsAware, PrefixedName[] names) { mNsAware = nsAware; int len = names.length; if (len == 0) { // sanity check throw new IllegalStateException("Trying to construct empty PrefixedNameSet"); } mStrings = new String[nsAware ? (len+len) : len]; for (int out = 0, in = 0; in < len; ++in) { PrefixedName nk = names[in]; if (nsAware) { mStrings[out++] = nk.getPrefix(); } mStrings[out++] = nk.getLocalName(); } }
String prefix = name.getPrefix(); if (strs[1] == ln && strs[0] == prefix) { return true;
String prefix = name.getPrefix(); if (strs[1] == ln && strs[0] == prefix) { return true;
String prefix = name.getPrefix(); if (strs[1] == ln && strs[0] == prefix) { return true;
/** * @return True if the set contains specified name; false if not. */ public boolean contains(PrefixedName name) { int len = mStrings.length; String ln = name.getLocalName(); String[] strs = mStrings; if (mNsAware) { String prefix = name.getPrefix(); if (strs[1] == ln && strs[0] == prefix) { return true; } for (int i = 2; i < len; i += 2) { if (strs[i+1] == ln && strs[i] == prefix) { return true; } } } else { if (strs[0] == ln) { return true; } for (int i = 1; i < len; ++i) { if (strs[i] == ln) { return true; } } } return false; }
String prefix = attrName.getPrefix(); if (prefix == null || prefix.length() == 0) { // defult NS -> "" prefix = "";
String prefix = attrName.getPrefix(); if (prefix == null || prefix.length() == 0) { // defult NS -> "" prefix = "";
String prefix = attrName.getPrefix(); if (prefix == null || prefix.length() == 0) { // defult NS -> "" prefix = "";
String prefix = attrName.getPrefix(); if (prefix == null || prefix.length() == 0) { // defult NS -> "" prefix = "";
String prefix = an.getPrefix(); String uri = ""; if (prefix != null && prefix.length() > 0) {
String prefix = an.getPrefix(); String uri = ""; if (prefix != null && prefix.length() > 0) {
String prefix = an.getPrefix(); String uri = ""; if (prefix != null && prefix.length() > 0) {
String prefix = an.getPrefix(); String uri = ""; if (prefix != null && prefix.length() > 0) {