BAEL-6699: Java Interface Naming Conventions (#14551)

* interfaces and implementations

* code review changes
This commit is contained in:
Pedro Lopes 2023-09-01 16:01:51 -03:00 committed by GitHub
parent 036409850b
commit 94b8db6042
4 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,5 @@
package com.baeldung.interfaces.namingconventions;
public interface Identifiable {
void identify();
}

View File

@ -0,0 +1,13 @@
package com.baeldung.interfaces.namingconventions;
public class RegularUser implements User {
@Override
public void identify() {
// some implementation
}
@Override
public void authorize() {
// some implementation
}
}

View File

@ -0,0 +1,13 @@
package com.baeldung.interfaces.namingconventions;
public class RootUser implements User {
@Override
public void identify() {
// some implementation
}
@Override
public void authorize() {
// some implementation
}
}

View File

@ -0,0 +1,5 @@
package com.baeldung.interfaces.namingconventions;
public interface User extends Identifiable {
void authorize();
}