projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add mod filter to template context factory.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
Image.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/Image.java
b/src/main/java/net/pterodactylus/sone/data/Image.java
index
6c37633
..
04eb349
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/Image.java
+++ b/
src/main/java/net/pterodactylus/sone/data/Image.java
@@
-105,7
+105,7
@@
public class Image implements Fingerprintable {
* @return This image
*/
public Image setSone(Sone sone) {
* @return This image
*/
public Image setSone(Sone sone) {
- Validation.begin().isNotNull("New Image Owner", sone);
+ Validation.begin().isNotNull("New Image Owner", sone)
.isEither("Old Image Owner", this.sone, null, sone).check()
;
this.sone = sone;
return this;
}
this.sone = sone;
return this;
}
@@
-151,7
+151,7
@@
public class Image implements Fingerprintable {
* @return This image
*/
public Image setKey(String key) {
* @return This image
*/
public Image setKey(String key) {
- Validation.begin().isNotNull("New Image Key", key).check();
+ Validation.begin().isNotNull("New Image Key", key).
isEither("Old Image Key", this.key, null, key).
check();
this.key = key;
return this;
}
this.key = key;
return this;
}
@@
-187,7
+187,7
@@
public class Image implements Fingerprintable {
* @return This image
*/
public Image setCreationTime(long creationTime) {
* @return This image
*/
public Image setCreationTime(long creationTime) {
- Validation.begin().isGreater("New Image Creation Time", creationTime, 0).check();
+ Validation.begin().isGreater("New Image Creation Time", creationTime, 0).
isEither("Old Image Creation Time", this.creationTime, 0L, creationTime).
check();
this.creationTime = creationTime;
return this;
}
this.creationTime = creationTime;
return this;
}
@@
-210,7
+210,7
@@
public class Image implements Fingerprintable {
* @return This image
*/
public Image setWidth(int width) {
* @return This image
*/
public Image setWidth(int width) {
- Validation.begin().isGreater("New Image Width", width, 0).check();
+ Validation.begin().isGreater("New Image Width", width, 0).
isEither("Old Image Width", this.width, 0, width).
check();
this.width = width;
return this;
}
this.width = width;
return this;
}
@@
-233,7
+233,7
@@
public class Image implements Fingerprintable {
* @return This image
*/
public Image setHeight(int height) {
* @return This image
*/
public Image setHeight(int height) {
- Validation.begin().isGreater("New Image Height", height, 0);
+ Validation.begin().isGreater("New Image Height", height, 0)
.isEither("Old Image Height", this.height, 0, height).check()
;
this.height = height;
return this;
}
this.height = height;
return this;
}