+--------------------+ | ISelectIF | +--------------------+ | boolean select(IF) |..... +-----------------------------+ +-----------+--------+ : | ILoIF | ^ / \ : +-----------------------------+ : +---+ : | ILoF filter(ISelectIF pick) |. . . .: | : +-----------------------------+ | : / \ | : --- +--------------------+ : | | ShorterThan40000 | : ---------------------- +--------------------+ : | | | boolean select(IF) | : +---------+ +--------------+ +--------------------+ : | MtLoIF | | ConsLoIF | : +---------+ +--------------+ : +---------+ +--| IF first | : | | ILoIF rest | : | +--------------+ : v : +----------------+ : | ImageFile |<. . . . . . . . . . . . . . . . . . . . . +----------------+ | String name | | int width | | int height | | String kind | +----------------+ +------------------------------------------------------------+ | ExamplesILoIF | +------------------------------------------------------------+ | IF f1 = . . .(short) | | IF f2 = . . .(long) | | IF f3 = . . .(short) | | ILoIF mtloif = new MtLoIF() | | ILoIF alist ~ new ConsLoIF(f1, ... mtloif) | | ILoIF shortlist ~ new ConsLoIF(f1, ... f3, mtloif) | | | | ISelectIF shortfiles = new ShorterThan40000(); | | | | ... t.checkExpect(alist.filter(shortfiles), shortlist) ... | +------------------------------------------------------------+