@Test(expected = NullPointerException.class) public void testParseNullData() { mSubscriber.onNext(null); }
@Override public void onNext(List<Integer> apiYears) { int[] years = new int[apiYears.size()]; for (int i = apiYears.size() - 1; i >= 0; i--) { years[i] = apiYears.get(i); } Arrays.sort(years); for (int i = 0; i < years.length / 2; i++) { int temp = years[i]; int index = years.length - i - 1; years[i] = years[index]; years[index] = temp; } AndroidSchedulers.mainThread().createWorker() .schedule(() -> mCallback.updateYearsParticipated(years)); }
YearsParticipatedDropdownSubscriber extends Subscriber<List<Integer>> { @Override public void onNext(List<Integer> apiYears) { int[] years = new int[apiYears.size()]; for (int i = apiYears.size() - 1; i >= 0; i--) { years[i] = apiYears.get(i); } Arrays.sort(years); for (int i = 0; i < years.length / 2; i++) { int temp = years[i]; int index = years.length - i - 1; years[i] = years[index]; years[index] = temp; } AndroidSchedulers.mainThread().createWorker() .schedule(() -> mCallback.updateYearsParticipated(years)); } }
YearsParticipatedDropdownSubscriber extends Subscriber<List<Integer>> { @Override public void onNext(List<Integer> apiYears) { int[] years = new int[apiYears.size()]; for (int i = apiYears.size() - 1; i >= 0; i--) { years[i] = apiYears.get(i); } Arrays.sort(years); for (int i = 0; i < years.length / 2; i++) { int temp = years[i]; int index = years.length - i - 1; years[i] = years[index]; years[index] = temp; } AndroidSchedulers.mainThread().createWorker() .schedule(() -> mCallback.updateYearsParticipated(years)); } @Inject  YearsParticipatedDropdownSubscriber(YearsParticipatedUpdate callback); }
YearsParticipatedDropdownSubscriber extends Subscriber<List<Integer>> { @Override public void onNext(List<Integer> apiYears) { int[] years = new int[apiYears.size()]; for (int i = apiYears.size() - 1; i >= 0; i--) { years[i] = apiYears.get(i); } Arrays.sort(years); for (int i = 0; i < years.length / 2; i++) { int temp = years[i]; int index = years.length - i - 1; years[i] = years[index]; years[index] = temp; } AndroidSchedulers.mainThread().createWorker() .schedule(() -> mCallback.updateYearsParticipated(years)); } @Inject  YearsParticipatedDropdownSubscriber(YearsParticipatedUpdate callback); @Override void onCompleted(); @Override void onError(Throwable e); @Override void onNext(List<Integer> apiYears); }
YearsParticipatedDropdownSubscriber extends Subscriber<List<Integer>> { @Override public void onNext(List<Integer> apiYears) { int[] years = new int[apiYears.size()]; for (int i = apiYears.size() - 1; i >= 0; i--) { years[i] = apiYears.get(i); } Arrays.sort(years); for (int i = 0; i < years.length / 2; i++) { int temp = years[i]; int index = years.length - i - 1; years[i] = years[index]; years[index] = temp; } AndroidSchedulers.mainThread().createWorker() .schedule(() -> mCallback.updateYearsParticipated(years)); } @Inject  YearsParticipatedDropdownSubscriber(YearsParticipatedUpdate callback); @Override void onCompleted(); @Override void onError(Throwable e); @Override void onNext(List<Integer> apiYears);  }