src/org/ohmage/domain/campaign/CampaignMask.java
@Override
	public int compareTo(CampaignMask other) {
		int timeComparison =
			new Long(creationTime.getMillis()).compareTo(other.creationTime
				.getMillis());

		if(timeComparison == 0) {
			return maskId.compareTo(other.maskId);
		}
		else {
			return timeComparison;
		}
	}
/**
	 * Defines the sort-order for {@link CampaignMask} objects. They are first
	 * sorted by time and, if two masks were created at the same time, they are
	 * sorted by their ID.
	 * 
	 * @param other The {@link CampaignMask} object to compare to this
	 * 				{@link CampaignMask}.
	 * 
	 * @return Returns a negative number if this mask was created before the
	 *         other mask, a positive number if this mask was create after the
	 *         other mask, or, if the two masks were created at the same time,
	 *         the IDs are used for comparison.
	 */
Defines the sort-order for  CampaignMask objects. They are first
sorted by time and, if two masks were created at the same time, they are
sorted by their ID.

@param other The  CampaignMask object to compare to this
CampaignMask.

@return Returns a negative number if this mask was created before the
other mask, a positive number if this mask was create after the
other mask, or, if the two masks were created at the same time,
the IDs are used for comparison.
Defines the sort - order for CampaignMask objects . They are first sorted by time and if two masks were created at the same time they are sorted by their ID . @param other The CampaignMask object to compare to this CampaignMask . @return Returns a negative number if this mask was created before the other mask a positive number if this mask was create after the other mask or if the two masks were created at the same time the IDs are used for comparison .
@Override
	public int compareTo(CampaignMask other) {
		int timeComparison =
			new Long(creationTime.getMillis()).compareTo(other.creationTime
				.getMillis());
		if(timeComparison == 0) {
			return maskId.compareTo(other.maskId);
		}
		else {
			return timeComparison;
		}
	}
@ Override public int compareTo ( CampaignMask other ) { int timeComparison = new Long ( creationTime . getMillis ( ) ) . compareTo ( other . creationTime . getMillis ( ) ) ; if ( timeComparison == 0 ) { return maskId . compareTo ( other . maskId ) ; } else { return timeComparison ; } }
Defines the sort-order for {@link CampaignMask} objects.
Defines the sort - order for { @link CampaignMask } objects .