// Path: src/main/java/com/nebhale/jsonpath/internal/util/ArrayUtils.java
// public final class ArrayUtils {
// 
//     private static final String DELIMITERS = ", ";
// 
//     private ArrayUtils() {
//     }
// 
//     public static int[] parseAsIntArray(String value) {
//         StringTokenizer tokenizer = new StringTokenizer(value, DELIMITERS);
//         int[] array = new int[tokenizer.countTokens()];
//         for (int i = 0; i < array.length; i++) {
//             array[i] = Integer.parseInt(tokenizer.nextToken());
//         }
//         return array;
//     }
// 
//     public static String[] parseAsStringArray(String value) {
//         StringTokenizer tokenizer = new StringTokenizer(value, DELIMITERS);
//         String[] array = new String[tokenizer.countTokens()];
//         for (int i = 0; i < array.length; i++) {
//             array[i] = tokenizer.nextToken();
//         }
//         return array;
//     }
// }


import java.util.Arrays;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.nebhale.jsonpath.internal.util.ArrayUtils;
/*
 * Copyright 2013 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.nebhale.jsonpath.internal.component;



/**
 * A {@link PathComponent} that handles child names
 * <p />
 *
 * <strong>Concurrent Semantics</strong><br />
 *
 * Thread-safe
 */
public final class ChildPathComponent extends AbstractChainedPathComponent {

    private final String[] names;

    public ChildPathComponent(PathComponent delegate, String names) {
        super(delegate);
// Path: src/main/java/com/nebhale/jsonpath/internal/util/ArrayUtils.java
// public final class ArrayUtils {
// 
//     private static final String DELIMITERS = ", ";
// 
//     private ArrayUtils() {
//     }
// 
//     public static int[] parseAsIntArray(String value) {
//         StringTokenizer tokenizer = new StringTokenizer(value, DELIMITERS);
//         int[] array = new int[tokenizer.countTokens()];
//         for (int i = 0; i < array.length; i++) {
//             array[i] = Integer.parseInt(tokenizer.nextToken());
//         }
//         return array;
//     }
// 
//     public static String[] parseAsStringArray(String value) {
//         StringTokenizer tokenizer = new StringTokenizer(value, DELIMITERS);
//         String[] array = new String[tokenizer.countTokens()];
//         for (int i = 0; i < array.length; i++) {
//             array[i] = tokenizer.nextToken();
//         }
//         return array;
//     }
// }


// Path: src/main/java/com/nebhale/jsonpath/internal/component/ChildPathComponent.java
import java.util.Arrays;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.nebhale.jsonpath.internal.util.ArrayUtils;

/*
 * Copyright 2013 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.nebhale.jsonpath.internal.component;



/**
 * A {@link PathComponent} that handles child names
 * <p />
 *
 * <strong>Concurrent Semantics</strong><br />
 *
 * Thread-safe
 */
public final class ChildPathComponent extends AbstractChainedPathComponent {

    private final String[] names;

    public ChildPathComponent(PathComponent delegate, String names) {
        super(delegate);
        this.names = ArrayUtils.parseAsStringArray(names);