|
static KeysetScrollPosition of(Map<String, ?> keys, Direction direction) { |
|
|
|
Assert.notNull(keys, "Keys must not be null"); |
|
Assert.notNull(direction, "Direction must not be null"); |
|
|
|
return keys.isEmpty() |
|
? initial() |
|
: new KeysetScrollPosition(Collections.unmodifiableMap(new LinkedHashMap<>(keys)), direction); |
|
} |
Parameter direction
should not be ignored if keys is empty.