/** * Fluent factory method that will construct and return a new configuration * object instance with specified features disabled. */ @SuppressWarnings("unchecked") @Override public final T without(MapperFeature... features) { int newMapperFlags = _mapperFeatures; for (MapperFeature f : features) { newMapperFlags &= ~f.getMask(); } if (newMapperFlags == _mapperFeatures) { return (T) this; } return _withMapperFeatures(newMapperFlags); }
/** * Fluent factory method that will construct and return a new configuration * object instance with specified features enabled. */ @SuppressWarnings("unchecked") @Override public final T with(MapperFeature... features) { int newMapperFlags = _mapperFeatures; for (MapperFeature f : features) { newMapperFlags |= f.getMask(); } if (newMapperFlags == _mapperFeatures) { return (T) this; } return _withMapperFeatures(newMapperFlags); }
@SuppressWarnings("unchecked") @Override public final T with(MapperFeature feature, boolean state) { int newMapperFlags; if (state) { newMapperFlags = _mapperFeatures | feature.getMask(); } else { newMapperFlags = _mapperFeatures & ~feature.getMask(); } if (newMapperFlags == _mapperFeatures) { return (T) this; } return _withMapperFeatures(newMapperFlags); }
/** * Fluent factory method that will construct and return a new configuration * object instance with specified features enabled. */ @SuppressWarnings("unchecked") @Override public final T with(MapperFeature... features) { int newMapperFlags = _mapperFeatures; for (MapperFeature f : features) { newMapperFlags |= f.getMask(); } if (newMapperFlags == _mapperFeatures) { return (T) this; } return _withMapperFeatures(newMapperFlags); }
/** * Fluent factory method that will construct and return a new configuration * object instance with specified features disabled. */ @SuppressWarnings("unchecked") @Override public final T without(MapperFeature... features) { int newMapperFlags = _mapperFeatures; for (MapperFeature f : features) { newMapperFlags &= ~f.getMask(); } if (newMapperFlags == _mapperFeatures) { return (T) this; } return _withMapperFeatures(newMapperFlags); }
@SuppressWarnings("unchecked") @Override public final T with(MapperFeature feature, boolean state) { int newMapperFlags; if (state) { newMapperFlags = _mapperFeatures | feature.getMask(); } else { newMapperFlags = _mapperFeatures & ~feature.getMask(); } if (newMapperFlags == _mapperFeatures) { return (T) this; } return _withMapperFeatures(newMapperFlags); }