private static <T> Map<PoolKey, T>[] newEnumMap(Set<SessionProtocol> allowedProtocols) {
        @SuppressWarnings("unchecked")
        final Map<PoolKey, T>[] maps =
                (Map<PoolKey, T>[]) Array.newInstance(Map.class, SessionProtocol.values().length);
        // Attempting to access the array with an unallowed protocol will trigger NPE,
        // which will help us find a bug.
        for (SessionProtocol p : allowedProtocols) {
            maps[p.ordinal()] = new HashMap<>();
        }
        return maps;
    }
Returns an array whose index signifies {@link SessionProtocol#ordinal()}. Similar to {@link EnumMap}.
core/src/main/java/com/linecorp/armeria/client/HttpChannelPool.java