Retrieves a list of coordinates from the given string. If the number of numbers in the string is odd,
the last number is ignored.

@param inputString The inputstring
@return A list of coordinates
@throws TypeConversionException If the conversion failed
182853
public double[] getCoordinates(String inputString)
            throws TypeConversionException {
        String[] cstr = inputString.split(",");
        int coordLength;
        if (cstr.length % 2 == 0) {
            coordLength = cstr.length;
        } else {
            coordLength = cstr.length -1;
        }

        double[] coordinates = new double[coordLength];
        try {
            for (int index = 0; index < coordLength; index++) {
                coordinates[index] = Double.parseDouble(cstr[index]);
            }
            return coordinates;
        } catch (NumberFormatException e) {
            throw new TypeConversionException("String contains non-numeric data. Impossible to create envelope", e);
        }
    }
290864
private static List<Object> getTypeKeys(Conversion<?> conversion) {

		List<Object> result=new ArrayList<Object>();

		synchronized (typeConversions) {
			// Clone the conversions
			Map<Object,Conversion<?>> map=
				new HashMap<Object,Conversion<?>>(typeConversions);

			// Find all keys that map to this conversion instance
			for (Map.Entry<Object,Conversion<?>> entry: map.entrySet()) {
				if (entry.getValue() == conversion) {
					result.add(entry.getKey());
				}
			}
		}

		return result;
	}
504790
public static String[] getTypeStrs(Class[] types, boolean javaStyle) {
        if (CommonUtils.isEmpty(types)) {
            return StringUtils.EMPTY_STRING_ARRAY;
        } else {
            String[] strings = new String[types.length];
            for (int i = 0; i < types.length; i++) {
                strings[i] = javaStyle ? types[i].getName() : getTypeStr(types[i]);
            }
            return strings;
        }
    }
1167304
public static @Nonnull JsonArray lineStringToPolygon(@Nonnull double[][] lineString) {
        JsonArray jsonJLineString = toJsonJLineString(lineString);
        if (lineString[0][0] != lineString[lineString.length - 1][0] || lineString[0][1] != lineString[lineString.length - 1][1]) {
            // add last coordinate to close the polygon
            jsonJLineString.add(array(lineString[0][0], lineString[0][1]));
        }
        JsonArray result = array();
        result.add(jsonJLineString);
        return result;
    }
272834
@Override
    public long convert(int[] input, int inPos) {
        int Y = input[inPos++] & 0xFF;
        int Cb = input[inPos++] & 0xFF;
        int Cr = input[inPos] & 0xFF;

        byte r = (byte) sampleRangeLimitTable[sampleRangeLimitOffset + Y + Cr2R[Cr]];
        byte g = (byte) sampleRangeLimitTable[sampleRangeLimitOffset + Y + ((Cb2G[Cb] + Cr2G[Cr]) >> 16)];

        byte b = (byte) sampleRangeLimitTable[sampleRangeLimitOffset + Y + Cb2B[Cb]];

        return (0xFF000000L | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | (b & 0xFF));
    }
428946
protected List<Object> getParameters(GString gstring) {
        return new ArrayList<Object>(Arrays.asList(gstring.getValues()));
    }
833224
public MultiLineStringTo toTransferObject(MultiLineString input) {
        MultiLineStringTo result = new MultiLineStringTo();
        double[][][] resultCoordinates = new double[input.getNumGeometries()][][];
        for (int i = 0; i < input.getNumGeometries(); i++) {
            resultCoordinates[i] = getPoints(input.getGeometryN(i));
        }
        result.setCoordinates(resultCoordinates);
        result.setCrs(GeoJsonTo.createCrsTo("EPSG:" + input.getSRID()));
        return result;
    }
1098186
public static Configuration loadFromString(String config)
    throws IOException, SAXException {
    ConfigurationImpl cfg = new ConfigurationImpl();

    XMLReader parser = XMLReaderFactory.createXMLReader();
    parser.setContentHandler(new ConfigHandler(cfg, null));
    Reader reader = new StringReader(config);
    parser.parse(new InputSource(reader));
    return cfg;
  }
667973
public String convertString(String string)
    {        
        int start;
        int end = 0;
        while ((start = string.indexOf("k", end)) > 0)
        {
            end = start + 1;
            char ch = string.charAt(start - 1);
            if ((ch != '.') && (ch != ' '))
                continue;
            ch = string.charAt(start + 1);
            if (!Character.isUpperCase(ch))
                continue;
            boolean isUpper = false;
            for (; end < string.length(); end++)
            {
                 ch = string.charAt(end);
                if (!Character.isJavaIdentifierPart(ch))
                    break;
                if (!Character.isUpperCase(ch))
                    isUpper = true;
            }
            if (!isUpper) if ((end - start) >= 3)
                continue;
            if (end >= string.length())
                break;

            String newName = convertNameToConstant(string.substring(start+1, end));
            
            string = string.substring(0, start) + newName + string.substring(end);

        }
        return string;
    }
372471
private static BaseTypeConverter lookupTypeConverter(Class type) {
        BaseTypeConverter converter = (BaseTypeConverter)TYPE_CONVERTERS.get(type);
        if(converter == null) {
            String msg = "Could not find a TypeConverter for converting a String to an object of type \"" +
                (type != null ? type.getName() : null) + "\"";
            TypeConverterNotFoundException tcn = new TypeConverterNotFoundException(msg);

            if(type == null)
                msg = Bundle.getErrorString("TypeUtils_nullType");
            else
                msg = Bundle.getErrorString("TypeUtils_noConverterForType", new Object[]{type.getName()});
            tcn.setLocalizedMessage(msg);
            LOGGER.error(msg);

            throw tcn;
        }

        return converter;
    }
165685
public static Map<String, String> toStringStringMap(Map input) {
        Map<String, String> map = new HashMap<>();
        for (Object o : input.keySet()) {
            map.put(o.toString(), input.get(o) != null ? input.get(o).toString() : "");
        }
        return map;
    }
418114
private List<ParameterConverter> methodReturningConverters(final Class<?> type) {
        final List<ParameterConverter> converters = new ArrayList<>();
        for (final Method method : type.getMethods()) {
            if (method.isAnnotationPresent(AsParameterConverter.class)) {
                converters.add(new MethodReturningConverter(method, type, this));
            }
        }
        return converters;
    }
137170
public static Type typeFromString(String type) {
        final PrimitiveType primitive = PrimitiveType.fromName(type);
        if (primitive != null) {
            return primitive.getKeyClass();
        }
        try {
            return loadClassByName(type);
        } catch (Exception e) {
            //LOGGER.error(String.format("Failed to resolve '%s' into class", type), e);
        }
        return null;
    }
1147083
public static LocalDateInterval parseString(final String input) {
        String[] values = input.split("/");
        try {
            return new LocalDateInterval(parseLocalDate(values[0]), parseLocalDate(values[1]), IntervalEnding.EXCLUDING_END_DATE);
        } catch (Exception e) {
            throw new IllegalArgumentException("Unable to parse " + input);
        }
    }
133988
@SuppressWarnings("unchecked")
    public static MultiValueMap<String, String> getParamsFromQueryString(String queryString) {
        MultiValueMap queryParams = new LinkedMultiValueMap<>();

        if (StringUtils.isNotEmpty(queryString)) {
            String[] params = queryString.split("&");
            for (String param : params) {
                String[] splitParam = param.split("=");
                String paramName = splitParam[0];
                String paramValue = splitParam[1];

                queryParams.add(paramName, paramValue);
            }
        }

        return queryParams;
    }
81715
public static Map<String, String> convertDirectedListToMap(final List<String> inputList) {
        val mappings = new TreeMap<String, String>();
        inputList
            .stream()
            .map(s -> {
                val bits = Splitter.on("->").splitToList(s);
                return Pair.of(bits.get(0), bits.get(1));
            })
            .forEach(p -> mappings.put(p.getKey(), p.getValue()));
        return mappings;
    }
500970
@Override
    public List<String> getStringList( final String    key,
                                       final String    delim )
    {
        return formatStringList( key, getFormattedPropValue( key ), delim );
    }