@Test public void testPop() { CodeBuffer code = new CodeBuffer("pa", defaulConfiguration); assertThat((char) code.pop(), is('p')); assertThat((char) code.pop(), is('a')); assertThat(code.pop(), is( -1)); }
public final int pop() { if (bufferPosition >= buffer.length) { return -1; } int character = buffer[bufferPosition]; bufferPosition++; updateCursorPosition(character); if (recordingMode) { recordedCharacters.append((char) character); } lastChar = character; return character; }
CodeBuffer implements CharSequence { public final int pop() { if (bufferPosition >= buffer.length) { return -1; } int character = buffer[bufferPosition]; bufferPosition++; updateCursorPosition(character); if (recordingMode) { recordedCharacters.append((char) character); } lastChar = character; return character; } }
CodeBuffer implements CharSequence { public final int pop() { if (bufferPosition >= buffer.length) { return -1; } int character = buffer[bufferPosition]; bufferPosition++; updateCursorPosition(character); if (recordingMode) { recordedCharacters.append((char) character); } lastChar = character; return character; } protected  CodeBuffer(String code, CodeReaderConfiguration configuration); protected  CodeBuffer(Reader initialCodeReader, CodeReaderConfiguration configuration); }
CodeBuffer implements CharSequence { public final int pop() { if (bufferPosition >= buffer.length) { return -1; } int character = buffer[bufferPosition]; bufferPosition++; updateCursorPosition(character); if (recordingMode) { recordedCharacters.append((char) character); } lastChar = character; return character; } protected  CodeBuffer(String code, CodeReaderConfiguration configuration); protected  CodeBuffer(Reader initialCodeReader, CodeReaderConfiguration configuration); final int pop(); final int lastChar(); final int peek(); final int getLinePosition(); final Cursor getCursor(); final int getColumnPosition(); final CodeBuffer setColumnPosition(int cp); final void setLinePosition(int lp); final void startRecording(); final CharSequence stopRecording(); @Override final char charAt(int index); @Override final int length(); @Override final CharSequence subSequence(int start, int end); @Override final String toString(); }
CodeBuffer implements CharSequence { public final int pop() { if (bufferPosition >= buffer.length) { return -1; } int character = buffer[bufferPosition]; bufferPosition++; updateCursorPosition(character); if (recordingMode) { recordedCharacters.append((char) character); } lastChar = character; return character; } protected  CodeBuffer(String code, CodeReaderConfiguration configuration); protected  CodeBuffer(Reader initialCodeReader, CodeReaderConfiguration configuration); final int pop(); final int lastChar(); final int peek(); final int getLinePosition(); final Cursor getCursor(); final int getColumnPosition(); final CodeBuffer setColumnPosition(int cp); final void setLinePosition(int lp); final void startRecording(); final CharSequence stopRecording(); @Override final char charAt(int index); @Override final int length(); @Override final CharSequence subSequence(int start, int end); @Override final String toString();  }