Android Open Source - inbox-android Inbox App String Utils






From Project

Back to project page inbox-android.

License

The source code is released under:

MIT License

If you think the Android project inbox-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.inboxapp.androidsdk.utils;
/*from  w  w w . ja  v  a 2s.  com*/
import com.inboxapp.androidsdk.json_objects.single_objects.File;
import com.inboxapp.androidsdk.json_objects.single_objects.Participant;
import com.inboxapp.androidsdk.json_objects.single_objects.Tag;

import org.apache.commons.lang.StringUtils;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * Created by sylvianguessan on 8/11/14.
 */
public class InboxAppStringUtils {

    public static class StringUtils
    {
        public static String getAllString(ArrayList<String> aList)
        {
            String output = new String();
            if ((aList != null) && (aList.size() > 0)) {
                Iterator<String> itr= aList.iterator();
                while (itr.hasNext())
                {
                    String element =  (String) itr.next();
                    if (output.length() > 0)
                        output = output + ", " + element;
                    else
                        output =  element;
                }
                return output;
            }
            else
                return "";

        }
        public static String getAllParticipantsString(ArrayList<Participant> aList)
        {
            String output = new String();
            if ((aList != null) && (aList.size() > 0)) {
                Iterator<Participant> itr= aList.iterator();
                while (itr.hasNext())
                {
                    Participant element =  (Participant) itr.next();
                    String textStr = element.getName()+"("+element.getEmail()+")";
                    if (output.length() > 0)
                        output = output + ", " + textStr;
                    else
                        output = textStr;
                }
                return output;
            }
            else
                return "";

        }
        public static String getAllTagsString(ArrayList<Tag> aList)
        {
            String output = new String();
            if ((aList != null) && (aList.size() > 0)) {
                Iterator<Tag> itr= aList.iterator();
                while (itr.hasNext())
                {
                    Tag element =  (Tag) itr.next();
                    String textStr = element.getName()+"( id="+element.getId()+"/name="+element.getName()+")";
                    if (output.length() > 0)
                        output = output + ", " + textStr;
                    else
                        output = textStr;
                }
                return output;
            }
            else
                return "";

        }
        public static String getAllFilesString(ArrayList<File> aList)
        {
            String output = new String();
            if ((aList != null) && (aList.size() > 0)) {
                Iterator<File> itr= aList.iterator();
                while (itr.hasNext())
                {
                    File element =  (File) itr.next();
                    String textStr = element.getFileName()+"( id="+element.getId()+"/size="+element.getSize()+")";
                    if (output.length() > 0)
                        output = output + ", " + textStr;
                    else
                        output = textStr  ;
                }
                return output;
            }
            else
                return "";

        }
    }
}




Java Source Code List

com.inboxapp.androidapplication.MainActivity.java
com.inboxapp.androidsdk.apis.InboxAppClient.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTaskCallback.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTaskQueue.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxTaskID.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.CreateCustomTagTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.CreateDraftWithBodyTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.SendDraftWithBodyTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.SendDraftWithIDTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.UpdateThreadTagsTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.base.InboxAppTask.java
com.inboxapp.androidsdk.json_objects.collection_objects.ContactList.java
com.inboxapp.androidsdk.json_objects.collection_objects.DraftList.java
com.inboxapp.androidsdk.json_objects.collection_objects.FileList.java
com.inboxapp.androidsdk.json_objects.collection_objects.MessageList.java
com.inboxapp.androidsdk.json_objects.collection_objects.NameSpaceList.java
com.inboxapp.androidsdk.json_objects.collection_objects.ParticipantList.java
com.inboxapp.androidsdk.json_objects.collection_objects.TagList.java
com.inboxapp.androidsdk.json_objects.collection_objects.ThreadList.java
com.inboxapp.androidsdk.json_objects.single_objects.Contact.java
com.inboxapp.androidsdk.json_objects.single_objects.Draft.java
com.inboxapp.androidsdk.json_objects.single_objects.File.java
com.inboxapp.androidsdk.json_objects.single_objects.Message.java
com.inboxapp.androidsdk.json_objects.single_objects.Namespace.java
com.inboxapp.androidsdk.json_objects.single_objects.Participant.java
com.inboxapp.androidsdk.json_objects.single_objects.Tag.java
com.inboxapp.androidsdk.json_objects.single_objects.Thread.java
com.inboxapp.androidsdk.json_objects.single_objects.base.InboxAppSingleObject.java
com.inboxapp.androidsdk.json_objects.single_objects.body_objects.DraftID.java
com.inboxapp.androidsdk.json_objects.single_objects.body_objects.TagEdit.java
com.inboxapp.androidsdk.json_objects.single_objects.body_objects.TagName.java
com.inboxapp.androidsdk.sample_application.SampleArrayAdapter.java
com.inboxapp.androidsdk.sample_application.SampleDetailsActivity.java
com.inboxapp.androidsdk.sample_application.SampleMenuActivity.java
com.inboxapp.androidsdk.scratchpad.Scratchpad_MainActivity.java
com.inboxapp.androidsdk.scratchpad.scratchpad_apis.JacksonContributor.java
com.inboxapp.androidsdk.scratchpad.scratchpad_apis.TestApi.java
com.inboxapp.androidsdk.utils.InboxAppStringUtils.java