/** * Method that calculates bit set (flags) of all features that * are enabled by default. */ public static int collectDefaults() { int flags = 0; for (Feature f : values()) { if (f.enabledByDefault()) { flags |= f.getMask(); } } return flags; }
public CBORGenerator disable(Feature f) { _formatFeatures &= ~f.getMask(); if (f == Feature.WRITE_MINIMAL_INTS) { _cfgMinimalInts = false; } return this; }
/** * Method for disabling specified generator feature * (check {@link CBORGenerator.Feature} for list of features) */ public CBORFactory disable(CBORGenerator.Feature f) { _formatGeneratorFeatures &= ~f.getMask(); return this; }
public CBORFactoryBuilder disable(CBORGenerator.Feature f) { _formatWriteFeatures &= ~f.getMask(); return _this(); }
public CBORGenerator disable(Feature f) { _formatFeatures &= ~f.getMask(); if (f == Feature.WRITE_MINIMAL_INTS) { _cfgMinimalInts = false; } return this; }
public CBORGenerator enable(Feature f) { _formatFeatures |= f.getMask(); if (f == Feature.WRITE_MINIMAL_INTS) { _cfgMinimalInts = true; } return this; }
public CBORGenerator enable(Feature f) { _formatFeatures |= f.getMask(); if (f == Feature.WRITE_MINIMAL_INTS) { _cfgMinimalInts = true; } return this; }
/** * Method that calculates bit set (flags) of all features that are * enabled by default. */ public static int collectDefaults() { int flags = 0; for (Feature f : values()) { if (f.enabledByDefault()) { flags |= f.getMask(); } } return flags; }
@Override public boolean enabledIn(int flags) { return (flags & getMask()) != 0; }
/** * Method for disabling specified generator feature * (check {@link CBORGenerator.Feature} for list of features) */ public CBORFactory disable(CBORGenerator.Feature f) { _formatGeneratorFeatures &= ~f.getMask(); return this; }
/** * Check whether specified generator feature is enabled. */ public final boolean isEnabled(CBORGenerator.Feature f) { return (_formatGeneratorFeatures & f.getMask()) != 0; }
/** * Method for enabling specified generator features * (check {@link CBORGenerator.Feature} for list of features) */ public CBORFactory enable(CBORGenerator.Feature f) { _formatGeneratorFeatures |= f.getMask(); return this; }
public CBORGenerator enable(Feature f) { _formatFeatures |= f.getMask(); if (f == Feature.WRITE_MINIMAL_INTS) { _cfgMinimalInts = true; } return this; }
/** * Check whether specified generator feature is enabled. */ public final boolean isEnabled(CBORGenerator.Feature f) { return (_formatGeneratorFeatures & f.getMask()) != 0; }
/** * Check whether specified generator feature is enabled. */ public final boolean isEnabled(CBORGenerator.Feature f) { return (_formatGeneratorFeatures & f.getMask()) != 0; }
/** * Method for disabling specified generator feature * (check {@link CBORGenerator.Feature} for list of features) */ public CBORFactory disable(CBORGenerator.Feature f) { _formatGeneratorFeatures &= ~f.getMask(); return this; }
/** * Method for enabling specified generator features * (check {@link CBORGenerator.Feature} for list of features) */ public CBORFactory enable(CBORGenerator.Feature f) { _formatGeneratorFeatures |= f.getMask(); return this; }
public CBORGenerator disable(Feature f) { _formatFeatures &= ~f.getMask(); if (f == Feature.WRITE_MINIMAL_INTS) { _cfgMinimalInts = false; } return this; }