BAEL-6699: Java Interface Naming Conventions (#14551)
* interfaces and implementations * code review changes
This commit is contained in:
parent
036409850b
commit
94b8db6042
@ -0,0 +1,5 @@
|
|||||||
|
package com.baeldung.interfaces.namingconventions;
|
||||||
|
|
||||||
|
public interface Identifiable {
|
||||||
|
void identify();
|
||||||
|
}
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
package com.baeldung.interfaces.namingconventions;
|
||||||
|
|
||||||
|
public interface User extends Identifiable {
|
||||||
|
void authorize();
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user