Improvements to the JavaDocs in the API

This commit is contained in:
Luck
2016-08-22 15:50:20 +01:00
Unverified
parent 692bf30cf5
commit f7baf67985
30 changed files with 607 additions and 106 deletions
@@ -66,7 +66,7 @@ public class UserLink extends PermissionHolderLink implements User {
}
@Override
public void setPrimaryGroup(String s) throws ObjectAlreadyHasException {
public void setPrimaryGroup(@NonNull String s) throws ObjectAlreadyHasException {
if (getPrimaryGroup().equalsIgnoreCase(s)) {
throw new ObjectAlreadyHasException();
}
@@ -33,19 +33,19 @@ class Utils {
static void checkUser(User user) {
if (!(user instanceof UserLink)) {
throw new IllegalArgumentException("User instance cannot be handled by this implementation.");
throw new IllegalStateException("User instance cannot be handled by this implementation.");
}
}
static void checkGroup(Group group) {
if (!(group instanceof GroupLink)) {
throw new IllegalArgumentException("Group instance cannot be handled by this implementation.");
throw new IllegalStateException("Group instance cannot be handled by this implementation.");
}
}
static void checkTrack(Track track) {
if (!(track instanceof TrackLink)) {
throw new IllegalArgumentException("Track instance cannot be handled by this implementation.");
throw new IllegalStateException("Track instance cannot be handled by this implementation.");
}
}