Back to project page XKCD-Reader.
The source code is released under:
Apache License
If you think the Android project XKCD-Reader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.davidtpate.xkcd.util; // w w w .j ava 2s . co m import com.davidtpate.xkcd.model.Constants; /** * General Util class for XKCD comics. */ public class ComicUtil { public static String getComicApiUrl(int comicNumber) { // If we have an extravagant case, default it to the Current Comic since it is invalid. if (comicNumber == Constants.LATEST_COMIC_NUMBER || comicNumber <= 0) { return Constants.API.LATEST_COMIC_ENDPOINT; } else { return String.format(Constants.API.SPECIFIC_COMIC_ENDPOINT, comicNumber); } } }