public class Completion
extends java.lang.Object
| Constructor and Description |
|---|
Completion(int start,
java.lang.String completion) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getCompletion() |
int |
getStart()
The start of a completion is the index in the input where the completion starts.
|
int |
hashCode() |
java.lang.String |
toString() |
public int getStart()
// The input the user types
String input = "test inp";
// Get the completion from somewhere
Completion completion = new Completion(5, "input");
input = input.substring(0, completion.getStart()) + completion.getCompletion();
public java.lang.String getCompletion()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object