Skip to content

Commit ff16090

Browse files
author
Dmytro Khmelenko
committed
Add missing Javadoc
1 parent f4265c5 commit ff16090

6 files changed

Lines changed: 44 additions & 11 deletions

File tree

app/src/main/java/com/khmelenko/lab/travisclient/adapter/BranchesListAdapter.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

app/src/main/java/com/khmelenko/lab/travisclient/adapter/BuildListAdapter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

app/src/main/java/com/khmelenko/lab/travisclient/adapter/SmartFragmentStatePagerAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
public 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);

app/src/main/java/com/khmelenko/lab/travisclient/adapter/viewholder/BuildViewHolder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
import 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;

app/src/main/java/com/khmelenko/lab/travisclient/network/response/IBuildState.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
import java.util.List;
44

5+
/**
6+
* Defines common data for the build state
7+
*
8+
* @author Dmytro Khmelenko
9+
*/
510
public interface IBuildState {
11+
612
long getId();
713

814
void setId(long id);

app/src/main/java/com/khmelenko/lab/travisclient/widget/BuildView.java

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)