private static int getOrdinal(final HLLType type) {
        for(int i=0; i<TYPE_ORDINALS.length; i++) {
            if(TYPE_ORDINALS[i].equals(type)) return i;
        }
        throw new RuntimeException("Unknown HLL type " + type);
    }
private static int getOrdinal ( final HLLType type ) { for ( int i = 0 ; i < TYPE_ORDINALS . length ; i ++ ) { if ( TYPE_ORDINALS [ i ] . equals ( type ) ) return i ; } throw new RuntimeException ( "Unknown HLL type " + type ) ; }
Gets the ordinal for the specified {@link HLLType}.

@param  type the type whose ordinal is desired
@return the ordinal for the specified type, to be used in the version byte.
This will always be non-negative.