Hi, The interface is restrictive on purpose because depending on the state backend it might not be possible to provide a List-like interface. There might be state backends that stream in the list from somewhere else or other restrictions. If we now allowed a more general interface here we would possibly prevent optimisations in the future or make certain implementations very hard to to efficiently.
Best, Aljoscha > On 16. May 2017, at 21:56, Radu Tudoran <radu.tudo...@huawei.com> wrote: > > Hi, > > I would like to work with ListState, more specifically I would need to access > the contents and sort them. For this I would need a collection type (e.g., > the List, Array...). > However, I see that if I have a variable of type <<ListState state=..>> the > only interfaces I have are: > state.get -> which returns an Iterable > Or > state.get.getIterator which returns an Iterator > > Basically if I use any of these I need now to copy the contents in an actual > List of Array. Is there any way to avoid this? ..perhaps there is an > implicit type that I can convert to... >