0

could you please explain me this piece of code? Thank you.

items.addItem("a").addItem("b").addItem("c").run();
2
  • What framework/library are you using here? Commented Nov 25, 2010 at 3:04
  • not sure if this should be tagged with closures... Commented Nov 25, 2010 at 3:09

2 Answers 2

1

It's an example of a fluent interface.

Sign up to request clarification or add additional context in comments.

Comments

1

Not sure what framework you're using, but the addItem method returns the parent instance (return this), so you can call another method upon the output.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.