Class DefaultMethodExamples.AdminUser
java.lang.Object
net.jrodolfo.java_evolution.java08.DefaultMethodExamples.AdminUser
- All Implemented Interfaces:
DefaultMethodExamples.Named
- Enclosing class:
DefaultMethodExamples
public static class DefaultMethodExamples.AdminUser
extends Object
implements DefaultMethodExamples.Named
Implementation that overrides a default method while keeping the others.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the display form of the name.name()Supplies the raw name owned by the implementation.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DefaultMethodExamples.Named
initials
-
Constructor Details
-
AdminUser
Creates an admin user that overrides the display-name behavior.- Parameters:
name- the user's name
-
-
Method Details
-
name
Description copied from interface:DefaultMethodExamples.NamedSupplies the raw name owned by the implementation.- Specified by:
namein interfaceDefaultMethodExamples.Named- Returns:
- the raw name supplied by the implementation
-
displayName
Description copied from interface:DefaultMethodExamples.NamedReturns the display form of the name.- Specified by:
displayNamein interfaceDefaultMethodExamples.Named- Returns:
- a user-friendly name for display
-