Advertisement

Consumers

  • Ralph Lecessi
Chapter

Abstract

Consumer is a functional interface that is used to process data. A Consumer object is specified with type parameter T. Its functional method, called accept, takes an argument of type T and has return type void. Long chains of consumers can be composed to perform an operation that does not require a result to be returned. As with other functional interfaces, the composed consumer of the first two operations becomes the first operand of the second composed consumer, and so on.

Copyright information

© Ralph Lecessi 2019

Authors and Affiliations

  • Ralph Lecessi
    • 1
  1. 1.Kendall ParkUSA

Personalised recommendations