public boolean equals(Object obj)
	{
		if(obj instanceof MiniCompound)
		{
			MiniCompound miniCompound = ((MiniCompound)obj);
			ArrayList<Element> copy = new ArrayList<Element>(miniCompound.elements.length);		//populate ArrayList
			copy.addAll(Arrays.asList(miniCompound.elements));
			
			boolean matchFound = true;
			for(int i = 0; i < elements.length; i++)
			{
				boolean subMatchFound = false;
				for(int j = 0; j < copy.size(); j++)
				{
					if(elements[i].equals(copy.get(j)))
					{
						subMatchFound = true;
						copy.remove(j);					//remove the first match you find to prevent double-matching
						break;
					}
				}
				if(!subMatchFound)
				{
					matchFound = false;
					break;
				}	
			}
			
			if(copy.size() > 0)		//if there are more elements in miniCompound than this
				matchFound = false;
			
			return matchFound;
		}
		return false;
	}