mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-24 21:07:26 +08:00
extended ListSource
This commit is contained in:
parent
924e6baf4c
commit
97af15ca2b
@ -30,4 +30,9 @@ public class EmptyListSource<T> implements ListSource<T> {
|
||||
return 0l;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T getResult(int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -38,4 +38,9 @@ public interface ListSource<T>{
|
||||
*/
|
||||
List<T> getResults(int fromIndex, int toIndex);
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return
|
||||
*/
|
||||
T getResult(int index);
|
||||
}
|
||||
|
||||
@ -42,4 +42,9 @@ public class SimpleListSource<T> implements ListSource<T> {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public T getResult(int index) {
|
||||
return list.get(index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user