Class StreamExamples.User
java.lang.Object
net.jrodolfo.java_evolution.java08.StreamExamples.User
- Enclosing class:
StreamExamples
Small Java 8-style data class used by the stream examples.
This deliberately avoids records because records were introduced much later, in Java 16.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
User
-
-
Method Details
-
name
- Returns:
- the user's display name
-
age
public int age()- Returns:
- the user's age
-
department
- Returns:
- the department the user belongs to
-
active
public boolean active()- Returns:
- whether the user is active
-