Code example for CharArrayBuffer

0
    public interface GroupCreator { 
        public void addGroup(int cursorPosition, int size, boolean expanded);
    } 
 
    /** Reusable char array buffer. */ 
    private CharArrayBuffer mBuffer1 = new CharArrayBuffer(128);
    /** Reusable char array buffer. */ 
    private CharArrayBuffer mBuffer2 = new CharArrayBuffer(128);
 
    /** The object on which the groups are created. */ 
    private final GroupCreator mGroupCreator;
 
    public CallLogGroupBuilder(GroupCreator groupCreator) {
        mGroupCreator = groupCreator;
    } 
 
    /** 
     * Finds all groups of adjacent entries in the call log which should be grouped together and 
     * calls {@link CallLogFragment.GroupCreator#addGroup(int, int, boolean)} on 
     * {@link #mGroupCreator} for each of them. 
     * <p>