Commit 1d68180a authored by Greg Messner's avatar Greg Messner
Browse files

Added isValid() method.

parent 4b96587f
......@@ -36,4 +36,8 @@ public class Branch {
public void setProtected (Boolean isProtected) {
this.isProtected = isProtected;
}
public static final boolean isValid (Branch branch) {
return (branch != null && branch.getName() != null);
}
}
......@@ -107,4 +107,8 @@ public class MergeRequest {
public void setUpvotes (Integer upvotes) {
this.upvotes = upvotes;
}
public static final boolean isValid (MergeRequest mergeRequest) {
return (mergeRequest != null && mergeRequest.getId() != null);
}
}
......@@ -201,4 +201,8 @@ public class Project {
public void setWikiEnabled (Boolean wikiEnabled) {
this.wikiEnabled = wikiEnabled;
}
public static final boolean isValid (Project project) {
return (project != null && project.getId() != null);
}
}
......@@ -163,4 +163,8 @@ public class User {
public void setWebsiteUrl (String websiteUrl) {
this.websiteUrl = websiteUrl;
}
public static final boolean isValid (User user) {
return (user != null && user.getId() != null);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment