From 848a1d725b9b0062805df7ca1abd0a439767bccd Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Tue, 12 Aug 2003 19:31:54 +0000 Subject: [PATCH] Variable name changes. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2022 b35dd754-fafc-0310-a699-88a17e54d16e --- .../jivesoftware/smack/util/StringUtils.java | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/source/org/jivesoftware/smack/util/StringUtils.java b/source/org/jivesoftware/smack/util/StringUtils.java index 86b2cf921..9f43a30c0 100644 --- a/source/org/jivesoftware/smack/util/StringUtils.java +++ b/source/org/jivesoftware/smack/util/StringUtils.java @@ -68,71 +68,71 @@ public class StringUtils { private static final char[] GT_ENCODE = ">".toCharArray(); /** - * Returns the name portion of a XMPP ID. For example, for the - * ID "matt@jivesoftware.com/Smack", "matt" would be returned. If no - * username is present in the ID, the empty string will be returned. + * Returns the name portion of a XMPP address. For example, for the + * address "matt@jivesoftware.com/Smack", "matt" would be returned. If no + * username is present in the address, the empty string will be returned. * - * @param ID the XMPP ID. - * @return the name portion of the XMPP ID. + * @param XMPPAddress the XMPP address. + * @return the name portion of the XMPP address. */ - public static String parseName(String ID) { - if (ID == null) { + public static String parseName(String XMPPAddress) { + if (XMPPAddress == null) { return null; } - int atIndex = ID.indexOf("@"); + int atIndex = XMPPAddress.indexOf("@"); if (atIndex < 0) { - return ID.substring(0); + return XMPPAddress.substring(0); } else { - return ID.substring(0, atIndex); + return XMPPAddress.substring(0, atIndex); } } /** - * Returns the name portion of a XMPP ID. For example, for the - * ID "matt@jivesoftware.com/Smack", "jivesoftware.com" would be returned. - * If no server is present in the ID, the empty string will be returned. + * Returns the name portion of a XMPP address. For example, for the + * address "matt@jivesoftware.com/Smack", "jivesoftware.com" would be returned. + * If no server is present in the address, the empty string will be returned. * - * @param ID the XMPP ID. - * @return the resource portion of the XMPP ID. + * @param XMPPAddress the XMPP address. + * @return the resource portion of the XMPP address. */ - public static String parseServer(String ID) { - if (ID == null) { + public static String parseServer(String XMPPAddress) { + if (XMPPAddress == null) { return null; } - int atIndex = ID.indexOf("@"); + int atIndex = XMPPAddress.indexOf("@"); // If the String ends with '@', return the empty string. - if (atIndex + 1 > ID.length() || atIndex < 0) { + if (atIndex + 1 > XMPPAddress.length() || atIndex < 0) { return ""; } - int slashIndex = ID.indexOf("/"); + int slashIndex = XMPPAddress.indexOf("/"); if (slashIndex > 0) { - return ID.substring(atIndex + 1, slashIndex); + return XMPPAddress.substring(atIndex + 1, slashIndex); } else { - return ID.substring(atIndex + 1); + return XMPPAddress.substring(atIndex + 1); } } /** - * Returns the name portion of a XMPP ID. For example, for the - * ID "matt@jivesoftware.com/Smack", "Smack" would be returned. If no - * resource is present in the ID, the empty string will be returned. + * Returns the name portion of a XMPP address. For example, for the + * address "matt@jivesoftware.com/Smack", "Smack" would be returned. If no + * resource is present in the address, the empty string will be returned. * - * @param ID the XMPP ID. - * @return the resource portion of the XMPP ID. + * @param XMPPAddress the XMPP address. + * @return the resource portion of the XMPP address. */ - public static String parseResource(String ID) { - if (ID == null) { + public static String parseResource(String XMPPAddress) { + if (XMPPAddress == null) { return null; } - int slashIndex = ID.indexOf("/"); - if (slashIndex + 1 > ID.length() || slashIndex < 0) { + int slashIndex = XMPPAddress.indexOf("/"); + if (slashIndex + 1 > XMPPAddress.length() || slashIndex < 0) { return ""; } else { - return ID.substring(slashIndex + 1); + return XMPPAddress.substring(slashIndex + 1); } }