public class FooProvider extends Object implements ITreeProvider<Foo>
Foos.
For simplicity all foos are kept as class members, in a real world scenario these would be
fetched from a database. If Foos were Serializable you could of course just keep
references in instance variables.model(Foo),
Serialized Form| Constructor and Description |
|---|
FooProvider()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
void |
detach()
Nothing to do.
|
Iterator<Foo> |
getChildren(Foo foo) |
Iterator<Foo> |
getRoots() |
boolean |
hasChildren(Foo foo) |
IModel<Foo> |
model(Foo foo)
Creates a
FooModel. |
public void detach()
detach in interface IDetachablepublic Iterator<Foo> getRoots()
getRoots in interface ITreeProvider<Foo>public boolean hasChildren(Foo foo)
hasChildren in interface ITreeProvider<Foo>public Iterator<Foo> getChildren(Foo foo)
getChildren in interface ITreeProvider<Foo>Copyright © 2020. All rights reserved.