Code example for Queue

Methods: addAll

this.ctx = ctx;
		Comparator<SMSMessage> comparator = new SMSMessageDeliveryTimeComparator();
		messageQueue = new PriorityBlockingQueue<SMSMessage>(11, comparator);
	public static SMSDeliveryService getInstance(Context ctx)
		if (_instance == null)
			SMSMessageDBAdapter adapter = new SMSMessageDBAdapter(ctx);;
			Collection<SMSMessage> c = adapter.getAllMessages();
			_instance = new SMSDeliveryService(ctx, c);
			// Start the background Delivery service 
Connect your IDE to all the code out there  Get Codota for Java