Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed JLineStringBuilder and JLineBuffer, since they were JDK 1.5+

  • Loading branch information...
commit 006b0072f0948a0cdced34b7d167e4f8cf23737c 1 parent 4cdc576
mprudhom authored
View
6 src/main/java/jline/CursorBuffer.java
@@ -15,7 +15,7 @@
public class CursorBuffer {
public int cursor = 0;
- JLineBuffer buffer = new JLineStringBuilder();
+ StringBuffer buffer = new StringBuffer();
private boolean overtyping = false;
@@ -89,11 +89,11 @@ public void setOvertyping(boolean b) {
overtyping = b;
}
- public JLineBuffer getBuffer() {
+ public StringBuffer getBuffer() {
return buffer;
}
- public void setBuffer(JLineBuffer buffer) {
+ public void setBuffer(StringBuffer buffer) {
buffer.setLength(0);
buffer.append(this.buffer.toString());
View
26 src/main/java/jline/JLineBuffer.java
@@ -1,26 +0,0 @@
-package jline;
-
-
-
-public interface JLineBuffer extends Appendable, CharSequence
-{
-
- public void delete(int start, int end);
-
- public void insert(int offset, char c);
-
- public void deleteCharAt(int index);
-
- public void insert(int offset, CharSequence s);
-
- // Don't throw Exceptions
- public Appendable append(CharSequence s);
-
- public void setLength(int newLength);
-
- public String substring(int start);
-
- public String substring(int start, int end);
-
- public void replace(int start, int end, String str);
-}
View
69 src/main/java/jline/JLineStringBuilder.java
@@ -1,69 +0,0 @@
-package jline;
-
-import java.io.IOException;
-
-
-public class JLineStringBuilder implements JLineBuffer
-{
- StringBuilder buffer = new StringBuilder();
-
- public Appendable append(CharSequence s) {
- return buffer.append(s);
- }
-
- public Appendable append(char c) throws IOException {
- return buffer.append(c);
- }
-
- public Appendable append(CharSequence s, int start, int end) throws IOException {
- return buffer.append(s, start, end);
- }
-
- public char charAt(int index) {
- return buffer.charAt(index);
- }
-
- public int length() {
- return buffer.length();
- }
-
- public CharSequence subSequence(int start, int end) {
- return buffer.subSequence(start, end);
- }
-
- public void delete(int start, int end) {
- buffer.delete(start, end);
- }
-
- public void deleteCharAt(int index) {
- buffer.deleteCharAt(index);
- }
-
- public void insert(int offset, char c) {
- buffer.insert(offset, c);
- }
-
- public void insert(int offset, CharSequence s) {
- buffer.insert(offset, s);
- }
-
- public void setLength(int newLength) {
- buffer.setLength(newLength);
- }
-
- public String substring(int start) {
- return buffer.substring(start);
- }
-
- public String substring(int start, int end) {
- return buffer.substring(start, end);
- }
-
- public void replace(int start, int end, String str) {
- buffer.replace(start, end, str);
- }
-
- public String toString() {
- return buffer.toString();
- }
-}
Please sign in to comment.
Something went wrong with that request. Please try again.