举个很简单的例子:
[code]public interface BaseDao<T> {
public void create (T t);
public void delete (T t);
public void update (T t);
}
public interface UserDao extends BaseDao<User> {
public void other (User user);
}
public interface RoleDao extends BaseDao<Role> {
public void other (Role role);
}[/code]
[code]public interface BaseDao<T> {
public void create (T t);
public void delete (T t);
public void update (T t);
}
public interface UserDao extends BaseDao<User> {
public void other (User user);
}
public interface RoleDao extends BaseDao<Role> {
public void other (Role role);
}[/code]