We have interface CharSequence . This interface contains the following methods:

 charAt(int index); lenght(); subSequence(int start, int end); toString(); 

The question is: Is it possible in IDEA, when creating the mentioned interface, not to write its methods manually, but to call it hotkeys? As, for example, using alt + insert, you can quickly call getters and setters, or class constructors.

    1 answer 1

    Hardly. This interface involves the manual creation of a new implementation for this interface. Suddenly you will create your own implementation, which contains the numeric values ​​of the characters and is sorted in the order of the hash codes. Then IDEA just can not guess what is there.

    By default, it can only generate empty methods that return null , 0, and false , depending on the return type. Michael described this item in more detail.