/** * Returns true if the given CharSequence is null or empty. * * @param cs * @return true if the given CharSequence is null or empty */ public static boolean isNullOrEmpty(CharSequence cs) { return cs == null || isEmpty(cs); }
/** * Creates a new chat with the specified user and thread ID. * * @param chatManager the chatManager the chat will use. * @param participant the user to chat with. * @param threadID the thread ID to use. */ Chat(ChatManager chatManager, EntityJid participant, String threadID) { if (StringUtils.isEmpty(threadID)) { throw new IllegalArgumentException("Thread ID must not be null"); } this.chatManager = chatManager; this.participant = participant; this.threadID = threadID; }
/** * MAM result extension constructor. * * @param queryId * @param id * @param forwarded */ public MamResultExtension(String queryId, String id, Forwarded forwarded) { if (StringUtils.isEmpty(id)) { throw new IllegalArgumentException("id must not be null or empty"); } if (forwarded == null) { throw new IllegalArgumentException("forwarded must no be null"); } this.id = id; this.forwarded = forwarded; this.queryId = queryId; }
/** * Returns true if the given CharSequence is null or empty. * * @param cs * @return true if the given CharSequence is null or empty */ public static boolean isNullOrEmpty(CharSequence cs) { return cs == null || isEmpty(cs); }
/** * Creates a new chat with the specified user and thread ID. * * @param chatManager the chatManager the chat will use. * @param participant the user to chat with. * @param threadID the thread ID to use. */ Chat(ChatManager chatManager, EntityJid participant, String threadID) { if (StringUtils.isEmpty(threadID)) { throw new IllegalArgumentException("Thread ID must not be null"); } this.chatManager = chatManager; this.participant = participant; this.threadID = threadID; }
/** * MAM result extension constructor. * * @param queryId * @param id * @param forwarded */ public MamResultExtension(String queryId, String id, Forwarded forwarded) { if (StringUtils.isEmpty(id)) { throw new IllegalArgumentException("id must not be null or empty"); } if (forwarded == null) { throw new IllegalArgumentException("forwarded must no be null"); } this.id = id; this.forwarded = forwarded; this.queryId = queryId; }