class FilteringHelper {

    public static Set<Class<? extends BaseDimensionalItemObject>> extractEntitiesFromInFilter( final String filter )
    {
        final Set<Class<? extends BaseDimensionalItemObject>> dimensionTypes = new HashSet<>( 0 );

        if ( contains( filter, DIMENSION_TYPE_IN_FILTER_PREFIX ) )
        {
            final String[] dimensionTypesInFilter = split( deleteWhitespace( substringBetween( filter, "[", "]" ) ),
                "," );

            if ( isNotEmpty( dimensionTypesInFilter ) )
            {
                for ( final String dimensionType : dimensionTypesInFilter )
                {
                    dimensionTypes.add( entityClassFromString( dimensionType ) );
                }
            }
            else
            {
                throw new IllegalQueryException( new ErrorMessage( E2014, filter ) );
            }
        }

        return dimensionTypes;
    }

}