-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9ed77a
commit 590a8f4
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version=1.2.0 | ||
version=1.3.0 |
29 changes: 29 additions & 0 deletions
29
src/main/java/net/rotgruengelb/nixienaut/operation/SimpleElementOperation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package net.rotgruengelb.nixienaut.operation; | ||
|
||
import net.rotgruengelb.nixienaut.object.IntIdentifiable; | ||
import net.rotgruengelb.nixienaut.object.StringIdentifiable; | ||
|
||
public enum SimpleElementOperation implements StringIdentifiable, IntIdentifiable { | ||
ADD(1, "add"), | ||
UPDATE(0, "update"), | ||
REMOVE(-1, "remove"); | ||
|
||
|
||
private final int difference; | ||
private final String stringRepresentation; | ||
|
||
SimpleElementOperation(int difference, String stringRepresentation) { | ||
this.difference = difference; | ||
this.stringRepresentation = stringRepresentation; | ||
} | ||
|
||
@Override | ||
public int getIntRepresentation() { | ||
return difference; | ||
} | ||
|
||
@Override | ||
public String getStringRepresentation() { | ||
return stringRepresentation; | ||
} | ||
} |