if (! domain.equals(other.domain))
if (!domain.equals(other.domain))
if (domain.equals(other.domain))
public static ArrayList<ArchivePersistenceObject> sortPersistenceObjects( final ArrayList<ArchivePersistenceObject> perObjs, final String fieldString, final Boolean ascending) throws NoSuchFieldException { IdentifierList tmpDomain; ObjectType tmpObjType; ArrayList<ArchivePersistenceObject> stackA = perObjs; ArrayList<ArchivePersistenceObject> stackB; ArrayList<ArchivePersistenceObject> stackOut = new ArrayList<ArchivePersistenceObject>(); // Requirement 3.4.4.2.27: // "Each domain/object type pair shall be sorted separately from other domain/object type // pairs; there is no requirement for sorting to be applied across domain/object type pairs" while (!stackA.isEmpty()) { // We will sweep stackA // What is the current zeroth pair? tmpDomain = stackA.get(0).getDomain(); tmpObjType = stackA.get(0).getObjectType(); stackB = new ArrayList<ArchivePersistenceObject>(); // Make a stack B with all the equal pairs domain+objType for (int index = 0; index < stackA.size(); index++) { // Let's cycle the complete stack A if (stackA.get(index).getDomain().equals(tmpDomain) && stackA.get(index).getObjectType().equals(tmpObjType)) { // if the pair is the same... stackB.add(stackA.get(index)); stackA.remove(index); index--; // index has to be the same on next iteration; counter the index++ } } stackB = SortByField.sortStack(stackB, fieldString, ascending); // sort stack B stackOut.addAll(stackB); // and add all the stack to the output } return stackOut; }
if (! domain.equals(other.domain))
if (! domain.equals(other.domain))
if (! domain.equals(other.domain))
if (! domain.equals(other.domain))
if (!confSet.getDomain().equals(ConfigurationProviderSingleton.getDomain())) { return false;
&& obj.getKey().getDomain().equals(providerDomain)) {