出典:Wikipedia
出典:『Wikipedia』 (2011/07/15 20:55 UTC 版)
Method chaining is a technique that's common in high level programming languages. It is also used in the I/O handling of C++ standard library. Typically, method chaining simply consists of many methods on a class, each of which returns an object (possibly the current object itself). This enables invoking another method on the returned object immediately, leading to code that may look something like: