@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof CommunityState))
			return false;

		CommunityState other = (CommunityState) obj;
		List<BehaviorState> thisList = new LinkedList<BehaviorState>();
		thisList.addAll(this.behaviorState);
		Collections.sort(thisList);
		// System.out.println(thisList.size());

		List<BehaviorState> otherList = new LinkedList<BehaviorState>();
		otherList.addAll(other.getBehaviorStates());
		Collections.sort(otherList);
		// System.out.println(otherList.size());

		int length = thisList.size();
		if (length == 0)
			return true;

		for (int i = 0; i < length; i++)
			if (!(thisList.get(i).equals(otherList.get(i))))
				return false;

		return true;
	}