public <T extends Node> List<T> getElementsAs(Class<T> type) {
        return getElementsAs(type::cast);
    }
Gets the elements of the array as a list of a specific type of
{@link Node}.

@param type Type of Node to expect in each position.
@param <T> Type of Node to expect in each position.
@return Returns the List of the specified type.
@throws ExpectationNotMetException if the list contains elements of a different type.
smithy-model/src/main/java/software/amazon/smithy/model/node/ArrayNode.java