public String tryToValidate(PrefixedName elemName) { if (!elemName.equals(mElemName)) { return "Expected element <"+mElemName+">"; } if (++mCount > 1 && (mArity == '?' || mArity == ' ')) { return "More than one instance of element <"+mElemName+">"; } return null; }
public boolean contains(PrefixedName n) { return mName.equals(n); } }
/** * @return True if the set contains specified name; false if not. */ public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }
public String tryToValidate(PrefixedName elemName) { // First; have we already done that max. 1 sequence? if (mStep == 0 && mRounds == 1) { if (mArity == '?' || mArity == ' ') { return "was not expecting any more elements in the sequence (" +concatNames(mNames)+")"; } } PrefixedName next = mNames[mStep]; if (!elemName.equals(next)) { return expElem(mStep); } if (++mStep == mNames.length) { ++mRounds; mStep = 0; } return null; }
@Override public String tryToValidate(PrefixedName elemName) { if (!elemName.equals(mElemName)) { return "Expected element <"+mElemName+">"; } if (++mCount > 1 && (mArity == '?' || mArity == ' ')) { return "More than one instance of element <"+mElemName+">"; } return null; }
@Override public String tryToValidate(PrefixedName elemName) { if (!elemName.equals(mElemName)) { return "Expected element <"+mElemName+">"; } if (++mCount > 1 && (mArity == '?' || mArity == ' ')) { return "More than one instance of element <"+mElemName+">"; } return null; }
@Override public String tryToValidate(PrefixedName elemName) { if (!elemName.equals(mElemName)) { return "Expected element <"+mElemName+">"; } if (++mCount > 1 && (mArity == '?' || mArity == ' ')) { return "More than one instance of element <"+mElemName+">"; } return null; }
public String tryToValidate(PrefixedName elemName) { if (!elemName.equals(mElemName)) { return "Expected element <"+mElemName+">"; } if (++mCount > 1 && (mArity == '?' || mArity == ' ')) { return "More than one instance of element <"+mElemName+">"; } return null; }
public boolean contains(PrefixedName n) { return mName.equals(n); } }
/** * @return True if the set contains specified name; false if not. */ public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }
/** * @return True if the set contains specified name; false if not. */ @Override public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }
/** * @return True if the set contains specified name; false if not. */ @Override public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }
/** * @return True if the set contains specified name; false if not. */ @Override public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }
public String tryToValidate(PrefixedName elemName) { // First; have we already done that max. 1 sequence? if (mStep == 0 && mRounds == 1) { if (mArity == '?' || mArity == ' ') { return "was not expecting any more elements in the sequence (" +concatNames(mNames)+")"; } } PrefixedName next = mNames[mStep]; if (!elemName.equals(next)) { return expElem(mStep); } if (++mStep == mNames.length) { ++mRounds; mStep = 0; } return null; }
@Override public String tryToValidate(PrefixedName elemName) { // First; have we already done that max. 1 sequence? if (mStep == 0 && mRounds == 1) { if (mArity == '?' || mArity == ' ') { return "was not expecting any more elements in the sequence (" +concatNames(mNames)+")"; } } PrefixedName next = mNames[mStep]; if (!elemName.equals(next)) { return expElem(mStep); } if (++mStep == mNames.length) { ++mRounds; mStep = 0; } return null; }
@Override public String tryToValidate(PrefixedName elemName) { // First; have we already done that max. 1 sequence? if (mStep == 0 && mRounds == 1) { if (mArity == '?' || mArity == ' ') { return "was not expecting any more elements in the sequence (" +concatNames(mNames)+")"; } } PrefixedName next = mNames[mStep]; if (!elemName.equals(next)) { return expElem(mStep); } if (++mStep == mNames.length) { ++mRounds; mStep = 0; } return null; }
@Override public String tryToValidate(PrefixedName elemName) { // First; have we already done that max. 1 sequence? if (mStep == 0 && mRounds == 1) { if (mArity == '?' || mArity == ' ') { return "was not expecting any more elements in the sequence (" +concatNames(mNames)+")"; } } PrefixedName next = mNames[mStep]; if (!elemName.equals(next)) { return expElem(mStep); } if (++mStep == mNames.length) { ++mRounds; mStep = 0; } return null; }