Examples of KeyValuePairMatcher


Examples of programming5.strings.KeyValuePairMatcher

     * Test of seqFind method, of class ArrayOperations.
     */
    @Test
    public void testSeqFind_3args_1() {
        String[] findArray = new String[] {"first:a", "b:b", "other:a", "c:c"};
        KeyValuePairMatcher keyMatcher = new KeyValuePairMatcher();
        assertEquals(-1, ArrayOperations.seqFind("a", findArray, keyMatcher));
        assertEquals(2, ArrayOperations.seqFind("other", findArray, keyMatcher));
    }
View Full Code Here

Examples of programming5.strings.KeyValuePairMatcher

     * Test of seqFind method, of class ArrayOperations.
     */
    @Test
    public void testSeqFind_4args() {
        String[] findArray = new String[] {"first:a", "b:b", "other:a", "c:c"};
        KeyValuePairMatcher keyMatcher = new KeyValuePairMatcher();
        assertEquals(2, ArrayOperations.seqFind("other", findArray, 1, keyMatcher));
    }
View Full Code Here

Examples of programming5.strings.KeyValuePairMatcher

        return line;
    }

    private String fillParameter(DBPropertyKey key, String[] properties, String defaultValue) {
        String ret;
        int pos = ArrayOperations.seqFind(key.toString(), properties, new KeyValuePairMatcher());
        if (pos >= 0) {
            ret = properties[pos].split(":")[1].trim();
        }
        else {
            ret = defaultValue;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.