File tree Expand file tree Collapse file tree
app/src/main/java/com/khmelenko/lab/travisclient Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,8 +54,13 @@ public int getItemCount() {
5454 return mBranches != null ? mBranches .getBranches ().size () : 0 ;
5555 }
5656
57- public void setBranches (Branches repoStatus ) {
58- mBranches = repoStatus ;
57+ /**
58+ * Sets branches
59+ *
60+ * @param branches Branches
61+ */
62+ public void setBranches (Branches branches ) {
63+ mBranches = branches ;
5964 }
6065
6166}
Original file line number Diff line number Diff line change @@ -53,6 +53,11 @@ public int getItemCount() {
5353 return mBuildHistory != null ? mBuildHistory .getBuilds ().size () : 0 ;
5454 }
5555
56+ /**
57+ * Sets build history
58+ *
59+ * @param buildHistory Build history
60+ */
5661 public void setBuildHistory (BuildHistory buildHistory ) {
5762 mBuildHistory = buildHistory ;
5863 }
Original file line number Diff line number Diff line change 1616public abstract class SmartFragmentStatePagerAdapter extends FragmentStatePagerAdapter {
1717
1818 // Sparse array to keep track of registered fragments in memory
19- private SparseArray <Fragment > mRegisteredFragments = new SparseArray <Fragment >();
19+ private SparseArray <Fragment > mRegisteredFragments = new SparseArray <>();
2020
2121 public SmartFragmentStatePagerAdapter (FragmentManager fragmentManager ) {
2222 super (fragmentManager );
Original file line number Diff line number Diff line change 1111import butterknife .ButterKnife ;
1212
1313/**
14- * Viewholder class
14+ * View holder for the Build data
15+ *
16+ * @author Dmytro Khmelenko
1517 */
16- public class BuildViewHolder extends RecyclerView .ViewHolder implements View .OnClickListener {
18+ public final class BuildViewHolder extends RecyclerView .ViewHolder implements View .OnClickListener {
1719
1820 @ Bind (R .id .item_build_card_view )
1921 View mParent ;
Original file line number Diff line number Diff line change 22
33import java .util .List ;
44
5+ /**
6+ * Defines common data for the build state
7+ *
8+ * @author Dmytro Khmelenko
9+ */
510public interface IBuildState {
11+
612 long getId ();
713
814 void setId (long id );
Original file line number Diff line number Diff line change @@ -111,9 +111,9 @@ public void setFinishedAt(String finishedAt) {
111111 }
112112
113113 /**
114- * Sets branch data
114+ * Sets build state
115115 *
116- * @param buildState Branch
116+ * @param buildState Build state
117117 */
118118 public void setState (IBuildState buildState ) {
119119 if (buildState != null ) {
@@ -141,10 +141,20 @@ public void setCommit(Commit commit) {
141141 }
142142 }
143143
144- public void setTitle (String string ) {
145- mTitle .setText (string );
144+ /**
145+ * Sets title
146+ *
147+ * @param title Title
148+ */
149+ public void setTitle (String title ) {
150+ mTitle .setText (title );
146151 }
147152
153+ /**
154+ * Sets state indicator
155+ *
156+ * @param state Build state
157+ */
148158 public void setStateIndicator (String state ) {
149159 if (!TextUtils .isEmpty (state )) {
150160 int buildColor = BuildStateHelper .getBuildColor (state );
@@ -158,8 +168,13 @@ public void setStateIndicator(String state) {
158168 }
159169 }
160170
161- public void setPullRequestTitle (RequestData request ) {
171+ /**
172+ * Sets the title for pull request
173+ *
174+ * @param title Title for Pull Request
175+ */
176+ public void setPullRequestTitle (RequestData title ) {
162177 mPullRequest .setVisibility (VISIBLE );
163- mPullRequest .setText (request .getPullRequestTitle ());
178+ mPullRequest .setText (title .getPullRequestTitle ());
164179 }
165180}
You can’t perform that action at this time.
0 commit comments