Back to project page anti-piracy-android-app.
The source code is released under:
Apache License
If you think the Android project anti-piracy-android-app 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 mil.nga.giat.asam.model; /* w w w. j av a 2s. c o m*/ import java.io.Serializable; import mil.nga.giat.asam.util.AsamUtils; @SuppressWarnings("serial") public class TextQueryParametersBean implements Serializable { public String mDateFrom; public String mDateTo; public String mSubregion; public String mReferenceNumber; public String mVictim; public String mAggressor; public static TextQueryParametersBean newInstance(TextQueryParametersBean parameters) { TextQueryParametersBean copy = new TextQueryParametersBean(); copy.mDateFrom = parameters.mDateFrom; copy.mDateTo = parameters.mDateTo; copy.mSubregion = parameters.mSubregion; copy.mReferenceNumber = parameters.mReferenceNumber; copy.mVictim = parameters.mVictim; copy.mAggressor = parameters.mAggressor; return copy; } public boolean isEmpty() { boolean empty = true; if (!AsamUtils.isEmpty(mDateFrom)) { empty = false; } else if (!AsamUtils.isEmpty(mDateTo)) { empty = false; } else if (!AsamUtils.isEmpty(mSubregion)) { empty = false; } else if (!AsamUtils.isEmpty(mReferenceNumber)) { empty = false; } else if (!AsamUtils.isEmpty(mVictim)) { empty = false; } else if (!AsamUtils.isEmpty(mAggressor)) { empty = false; } return empty; } public String getParametersAsFormattedHtml() { StringBuilder html = new StringBuilder(); if (!AsamUtils.isEmpty(mDateFrom)) { html.append(String.format("<br/> - <b>Date From:</b> %s", mDateFrom)); } if (!AsamUtils.isEmpty(mDateTo)) { html.append(String.format("<br/> - <b>Date To:</b> %s", mDateTo)); } if (!AsamUtils.isEmpty(mSubregion)) { html.append(String.format("<br/> - <b>Subregion:</b> %s", mSubregion)); } if (!AsamUtils.isEmpty(mReferenceNumber)) { html.append(String.format("<br/> - <b>Reference Number:</b> %s", mReferenceNumber)); } if (!AsamUtils.isEmpty(mVictim)) { html.append(String.format("<br/> - <b>Victim:</b> %s", mVictim)); } if (!AsamUtils.isEmpty(mAggressor)) { html.append(String.format("<br/> - <b>Aggressor:</b> %s", mAggressor)); } return html.toString(); } }