Questions tagged as 'interface'

1
answer

Is it a bad practice to use empty interfaces?

I've heard comments that would be a good idea when a future implementation can occur. I've also heard that it's a bad practice. I know that in PHP, for example, there is an interface called Traversable who has nothing. It serves onl...
asked by 24.07.2015 / 17:31
1
answer

Insert background image in JPanel [duplicate]

I already checked and the path is correct, but when I run nothing appears on the screen: public class MapaInterface extends JPanel implements ActionListener { private Image fundo; public static Agente daenerys; private Timer timer; public...
asked by 23.07.2016 / 16:02
3
answers

Call a class method

How can I display the method of this revised class in the Test class? public interface Produto { void exibirNome(String nome); } public class Revista implements Produto { @Override public void exibirNome(String nome) {...
asked by 17.12.2016 / 23:42
1
answer

UX Interface in Delphi [closed]

Working as a UX designer, I now have to develop a good interface to the Delphi system in the company. Can I make animations and changes, like I did on the web part?     
asked by 02.04.2018 / 19:24
4
answers

Conversion of list of interfaces in object list: (ListInterface in ListObject)

I need to convert a IList<Interface> to a List<Objeto> . See the example: public interface IObjetosBase { IList<IObjetosBase> get(); } public class ObjetosBase : IObjetosBase { public virtual IList&l...
asked by 22.07.2017 / 14:33
2
answers

Reducing interface with Disposable

I saw an example implementation of a interface with Disposable which I think is redundant and would like to know if I'm right. Here is an example to illustrate: public interface IClassBase<TEntity> where TEntity : class...
asked by 04.10.2016 / 04:14
1
answer

How to use a concrete class method created from an interface?

In the Lawyer class, I've implemented all of the properties and methods of the IPessoaFisica Interface, and a few other methods and methods of the Lawyer class , such as Advocate () and Oab. How do I access this method? Being that in cre...
asked by 18.09.2016 / 20:12
1
answer

Interfaces can be instantiated?

Hello. I know interfaces can not be instantiated, but I came across a code that does not make much sense to me. EditText nameField = (EditText) findViewById(R.id.name_field); String name = nameField.getText().toString(); This second line th...
asked by 29.10.2017 / 06:50
2
answers

Explanation in constructor method

I have some doubts in the constructor method of a class that I'm seeing as an example, if anyone can explain thanks. private static IList<Categoria> categorias = new List<Categoria>() { new Categoria() {...
asked by 28.02.2017 / 14:41
1
answer

Leave some data from a non-mandatory java interface

I use interfaces to call android. public interface CallbackUsuario { void resultadoSalvar(boolean b); void resultadoTrazer(Usuario u); void resultadoListar(List<Usuario> lista); void resultadoExcluir(boolean b); void...
asked by 22.10.2016 / 14:20