public class TimeBoundStringBuffer extends Object
| Constructor and Description |
|---|
TimeBoundStringBuffer()
Default constructor.
|
TimeBoundStringBuffer(long bound)
Constructor that allows specifying the time interval in milliseconds.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLast(Character character)
Append a character to the search buffer.
|
String |
asString()
Returns the search buffer as a string.
|
boolean |
isEmpty()
Whether the search buffer is empty.
|
void |
removeLast()
Removes the last character from the search buffer.
|
void |
reset()
Clears the search buffer.
|
void |
resetIfTimedOut()
Reset the buffer in case the specified time interval has passed.
|
protected void |
resetKeyPressedTimeout()
Reset the key pressed timeout.
|
protected void |
resetKeyPressedTimer()
Reset the key pressed timer.
|
boolean |
timedOut()
Whether the key press timeout has been hit.
|
public TimeBoundStringBuffer()
public TimeBoundStringBuffer(long bound)
bound - the time bound after which the buffer should be resetpublic void addLast(Character character)
character - the Character to be appendedpublic void removeLast()
public void reset()
public void resetIfTimedOut()
public boolean isEmpty()
true, in case the buffer is empty, false otherwisepublic String asString()
public boolean timedOut()
true, if the timeout has been hit, false otherwiseprotected void resetKeyPressedTimer()
protected void resetKeyPressedTimeout()
Copyright © 2019. All rights reserved.