/** * Determines whether the given array is empty or not. * * @param array the array to evaluate for emptiness. * @return a boolean value indicating whether the given array is empty. * @see #length(Object...) */ public static boolean isEmpty(Object[] array) { return length(array) == 0; }
/** * Determines whether the given array is empty or not. * * @param array the array to evaluate for emptiness. * @return a boolean value indicating whether the given array is empty. * @see #length(Object...) */ public static boolean isEmpty(Object[] array) { return length(array) == 0; }
/** * Parses the array of hosts and ports in the format 'host[port]' to convert into an instance * of ConnectionEndpointList. * * @param defaultPort the default port number to use if port is not specified in a host and port value. * @param hostsPorts the array of hosts and ports to parse. * @return a ConnectionEndpointList representing the hosts and ports in the array. * @see org.springframework.data.gemfire.support.ConnectionEndpoint#parse(String, int) */ public static ConnectionEndpointList parse(int defaultPort, String... hostsPorts) { List<ConnectionEndpoint> connectionEndpoints = new ArrayList<ConnectionEndpoint>( ArrayUtils.length(hostsPorts)); for (String hostPort : ArrayUtils.nullSafeArray(hostsPorts, String.class)) { connectionEndpoints.add(ConnectionEndpoint.parse(hostPort, defaultPort)); } return new ConnectionEndpointList(connectionEndpoints); }
/** * Parses the array of hosts and ports in the format 'host[port]' to convert into an instance * of ConnectionEndpointList. * * @param defaultPort the default port number to use if port is not specified in a host and port value. * @param hostsPorts the array of hosts and ports to parse. * @return a ConnectionEndpointList representing the hosts and ports in the array. * @see org.springframework.data.gemfire.support.ConnectionEndpoint#parse(String, int) */ public static ConnectionEndpointList parse(int defaultPort, String... hostsPorts) { List<ConnectionEndpoint> connectionEndpoints = new ArrayList<ConnectionEndpoint>( ArrayUtils.length(hostsPorts)); for (String hostPort : ArrayUtils.nullSafeArray(hostsPorts, String.class)) { connectionEndpoints.add(ConnectionEndpoint.parse(hostPort, defaultPort)); } return new ConnectionEndpointList(connectionEndpoints); }