-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add proper exceptions and means of setting per-feature values
- Loading branch information
1 parent
883c38b
commit 37688af
Showing
29 changed files
with
347 additions
and
94 deletions.
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
15 changes: 15 additions & 0 deletions
15
src/main/java/io/github/blackspherefollower/buttplug4j/ButtplugException.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,15 @@ | ||
package io.github.blackspherefollower.buttplug4j; | ||
|
||
public class ButtplugException extends Exception { | ||
|
||
private String errorMessage = ""; | ||
|
||
protected final void setMessage(final String errorMessage) { | ||
this.errorMessage = errorMessage; | ||
} | ||
|
||
@Override | ||
public final String getMessage() { | ||
return errorMessage; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/io/github/blackspherefollower/buttplug4j/Util/Pair.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 io.github.blackspherefollower.buttplug4j.Util; | ||
|
||
public final class Pair<A, B> { | ||
|
||
private A a; | ||
private B b; | ||
|
||
public Pair(final A a, final B b) { | ||
this.a = a; | ||
this.b = b; | ||
} | ||
public A getLeft() { | ||
return a; | ||
} | ||
|
||
public B getRight() { | ||
return b; | ||
} | ||
|
||
public A setLeft(final A value) { | ||
a = value; | ||
return a; | ||
} | ||
|
||
public B setRight(final B value) { | ||
b = value; | ||
return b; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
src/main/java/io/github/blackspherefollower/buttplug4j/Util/package-info.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 @@ | ||
package io.github.blackspherefollower.buttplug4j.Util; |
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
Oops, something went wrong.