From 756be383ef0d4ae22deff84240d6405da5eb42f5 Mon Sep 17 00:00:00 2001 From: Tilmann Date: Sat, 14 Oct 2023 18:28:09 +0200 Subject: [PATCH] Added IndexConfig.create(), #33 (#34) --- CHANGELOG.md | 8 +++++++- src/main/java/org/tinspin/index/IndexConfig.java | 10 +++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bca17a9..32e42a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Nothing yet +## [2.1.1] - 2023-10-14 + +### Fixed +- Added `create()` method for `IndexConfig` [#33](https://github.com/tzaeschke/tinspin-indexes/issue/33) + ## [2.1.0] - 2023-08-12 ### Added @@ -141,7 +146,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added CHANGELOG - [2015-10-11] - Pushed to v1.3.3-SNAPSHOT - [2015-10-11] -[Unreleased]: https://github.com/tzaeschke/tinspin-indexes/compare/tinspin-indexes-2.1.0...HEAD +[Unreleased]: https://github.com/tzaeschke/tinspin-indexes/compare/tinspin-indexes-2.1.1...HEAD +[2.1.1]: https://github.com/tzaeschke/tinspin-indexes/compare/tinspin-indexes-2.1.0...tinspin-indexes-2.1.1 [2.1.0]: https://github.com/tzaeschke/tinspin-indexes/compare/tinspin-indexes-2.0.1...tinspin-indexes-2.1.0 [2.0.1]: https://github.com/tzaeschke/tinspin-indexes/compare/tinspin-indexes-2.0.0...tinspin-indexes-2.0.1 [2.0.0]: https://github.com/tzaeschke/tinspin-indexes/compare/tinspin-indexes-1.8.0...tinspin-indexes-2.0.0 diff --git a/src/main/java/org/tinspin/index/IndexConfig.java b/src/main/java/org/tinspin/index/IndexConfig.java index 0592146..e5d9303 100644 --- a/src/main/java/org/tinspin/index/IndexConfig.java +++ b/src/main/java/org/tinspin/index/IndexConfig.java @@ -19,13 +19,17 @@ public class IndexConfig { private int dimensions = 3; + private boolean defensiveKeyCopy = true; - boolean defensiveKeyCopy = true; - - IndexConfig(int dimensions) { + protected IndexConfig(int dimensions) { this.dimensions = dimensions; } + public IndexConfig create(int dimensions) { + return new IndexConfig(dimensions); + } + + /** * Number of dimensions. * @param dimensions Number of dimensions of keys.