geopackage-sdk/src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java
public boolean retainIndex(Collection<FeatureIndexType> types) {
        Set<FeatureIndexType> delete = new HashSet<>(indexLocationQueryOrder);
        delete.removeAll(types);
        return deleteIndex(delete);
    }
public boolean retainIndex(Collection<FeatureIndexType> types) {
        Set<FeatureIndexType> delete = new HashSet<>(indexLocationQueryOrder);
        delete.removeAll(types);
        return deleteIndex(delete);
    }
public boolean retainIndex ( Collection < FeatureIndexType > types ) { Set < FeatureIndexType > delete = new HashSet <> ( indexLocationQueryOrder ) ; delete . removeAll ( types ) ; return deleteIndex ( delete ) ; }
Retain the feature index from the index types and delete the others

@param types feature index types to retain
@return true if deleted from any type
@since 3.1.0
Retain the feature index from the index types and delete the others