Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-05-25 01:18:12 +0000
committerKevin Sawicki2011-05-25 01:18:44 +0000
commit29afd960ea54f68c8359e201232ad60f8c5b2f01 (patch)
tree5c79a5c88edc53da1c90078414126df53a15e4c2
parent2a67178c876c1fbb0d8f3d8d437c4442191ff8d3 (diff)
downloadegit-github-29afd960ea54f68c8359e201232ad60f8c5b2f01.tar.gz
egit-github-29afd960ea54f68c8359e201232ad60f8c5b2f01.tar.xz
egit-github-29afd960ea54f68c8359e201232ad60f8c5b2f01.zip
Consistently return this from setters.
Change-Id: I348a236b9ca6442d9b9520e01ec7a8f1d2d4e459 Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java8
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Milestone.java16
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java16
3 files changed, 30 insertions, 10 deletions
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java
index 233345a9..a09aa5d7 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Issue.java
@@ -90,9 +90,11 @@ public class Issue {
/**
* @param number
+ * @return this issue
*/
- public void setNumber(int number) {
+ public Issue setNumber(int number) {
this.number = number;
+ return this;
}
/**
@@ -166,9 +168,11 @@ public class Issue {
/**
* @param state
+ * @return this issue
*/
- public void setState(String state) {
+ public Issue setState(String state) {
this.state = state;
+ return this;
}
/**
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Milestone.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Milestone.java
index 6344ebea..4fc7080d 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Milestone.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Milestone.java
@@ -56,9 +56,11 @@ public class Milestone {
/**
* @param dueOn
+ * @return this milestone
*/
- public void setDueOn(Date dueOn) {
+ public Milestone setDueOn(Date dueOn) {
this.dueOn = dueOn != null ? new Date(dueOn.getTime()) : null;
+ return this;
}
/**
@@ -100,9 +102,11 @@ public class Milestone {
/**
* @param description
+ * @return this milestone
*/
- public void setDescription(String description) {
+ public Milestone setDescription(String description) {
this.description = description;
+ return this;
}
/**
@@ -114,9 +118,11 @@ public class Milestone {
/**
* @param state
+ * @return this milestone
*/
- public void setState(String state) {
+ public Milestone setState(String state) {
this.state = state;
+ return this;
}
/**
@@ -128,9 +134,11 @@ public class Milestone {
/**
* @param title
+ * @return this milestone
*/
- public void setTitle(String title) {
+ public Milestone setTitle(String title) {
this.title = title;
+ return this;
}
/**
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java
index 42775414..44396be8 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Repository.java
@@ -170,9 +170,11 @@ public class Repository {
/**
* @param name
+ * @return this repository
*/
- public void setName(String name) {
+ public Repository setName(String name) {
this.name = name;
+ return this;
}
/**
@@ -212,9 +214,11 @@ public class Repository {
/**
* @param isPrivate
+ * @return this repository
*/
- public void setPrivate(boolean isPrivate) {
+ public Repository setPrivate(boolean isPrivate) {
this.isPrivate = isPrivate;
+ return this;
}
/**
@@ -241,9 +245,11 @@ public class Repository {
/**
* @param description
+ * @return this repository
*/
- public void setDescription(String description) {
+ public Repository setDescription(String description) {
this.description = description;
+ return this;
}
/**
@@ -255,9 +261,11 @@ public class Repository {
/**
* @param homepage
+ * @return this repository
*/
- public void setHomepage(String homepage) {
+ public Repository setHomepage(String homepage) {
this.homepage = homepage;
+ return this;
}
/**

Back to the top