diff --git a/README.md b/README.md
index d99e568..1bb1af7 100644
--- a/README.md
+++ b/README.md
@@ -10,12 +10,12 @@ It encapsulates the cross-compiled Java code from **LIBSVM** behind an object-or
To use the latest release of **zlibsvm**, please use the following snippet in your `pom.xml`
-#### Java 11+
+#### Java 17+
```xml
de.hs-heilbronn.mi
zlibsvm-core
- 2.0.9
+ 2.1.0
```
@@ -91,40 +91,21 @@ First of all, you need to implement your custom `SvmDocument` and a custom `SvmF
```
```java
- public class SvmFeatureImpl implements SvmFeature {
-
- private int index;
- private double value;
-
- public SvmFeatureImpl(int index, double value) {
- this.index = index;
- this.value = value;
- }
-
- public int getIndex() {
- return index;
- }
-
- public double getValue() {
- return value;
- }
-
- public void setIndex(int index) {
- this.index = index;
-
- }
-
- public void setValue(double value) {
- this.value = value;
-
- }
-
- @Override
- public int compareTo(SvmFeature o) {
- throw new UnsupportedOperationException("TODO: Implement this method for real use-cases");
- }
- }
-
+public record SvmFeatureImpl(int index, double value) implements SvmFeature {
+
+ public int getIndex() {
+ return index;
+ }
+
+ public double getValue() {
+ return value;
+ }
+
+ @Override
+ public int compareTo(SvmFeature o) {
+ return Integer.compare(getIndex(), o.getIndex());
+ }
+}
```
To obtain an `SvmModel` the SVM needs to be trained. This is done via an `SvmConfigurationImpl.Builder()`, which is used to specify your custom SVM configuration.
diff --git a/pom.xml b/pom.xml
index 98411e7..65c4ac7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
de.hs-heilbronn.mi
zlibsvm
pom
- 2.1.0-SNAPSHOT
+ 2.1.0
zlibsvm
A Java binding for the famous LIBSVM library
@@ -78,7 +78,7 @@
UTF-8
${java.target}
- 2.1.0-SNAPSHOT
+ 2.1.0
3.31
3.13.0
diff --git a/zlibsvm-api/pom.xml b/zlibsvm-api/pom.xml
index aad8aa2..4a2b630 100644
--- a/zlibsvm-api/pom.xml
+++ b/zlibsvm-api/pom.xml
@@ -5,7 +5,7 @@
de.hs-heilbronn.mi
zlibsvm
- 2.1.0-SNAPSHOT
+ 2.1.0
4.0.0
diff --git a/zlibsvm-core/pom.xml b/zlibsvm-core/pom.xml
index 97049a4..117db0c 100644
--- a/zlibsvm-core/pom.xml
+++ b/zlibsvm-core/pom.xml
@@ -5,7 +5,7 @@
de.hs-heilbronn.mi
zlibsvm
- 2.1.0-SNAPSHOT
+ 2.1.0
4.0.0