public class CharSequenceFuture extends Object implements Future<CharSequence>
This Future object already has it result and does not use any background Thread and simply return the
CharSequence
provided at the construction time.
Constructor and Description |
---|
CharSequenceFuture(CharSequence charSequence)
Create a new Future object which will return the
CharSequence provided as parameter. |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
CharSequence |
get() |
CharSequence |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public CharSequenceFuture(CharSequence charSequence)
CharSequence
provided as parameter.charSequence
- the sequence which will be returned on get()
public boolean isDone()
isDone
in interface Future<CharSequence>
public boolean isCancelled()
isCancelled
in interface Future<CharSequence>
public CharSequence get(long timeout, TimeUnit unit)
get
in interface Future<CharSequence>
public CharSequence get()
get
in interface Future<CharSequence>
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface Future<CharSequence>
Copyright © 2008–2018. All rights reserved.