Skip to content

Commit

Permalink
Added IndexConfig.create(), #33 (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzaeschke authored Oct 14, 2023
1 parent 7cc35e1 commit 756be38
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/org/tinspin/index/IndexConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 756be38

Please sign in to comment.