trait Pushback[T] extends SafeIterator[T]
The Pushback
trait can be mixed into an SafeIterator
to permit
arbitrary pushback.
NOTE: This trait it not thread-safe.
- Alphabetic
- By Inheritance
- Pushback
- SafeIterator
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
next: Option[T]
Get the next item from the stream, advancing the cursor, while honoring previous calls to
pushback()
.Get the next item from the stream, advancing the cursor, while honoring previous calls to
pushback()
.- returns
an
Option
containing the next item, orNone
if the iterator is exhausted.
- Definition Classes
- Pushback → SafeIterator
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
pushback(item: T): Unit
Push a single item back onto the stream.
Push a single item back onto the stream.
- item
the item
-
def
pushbackMany(items: List[T]): Unit
Push a list of items back onto the stream.
Push a list of items back onto the stream. The items are pushed back in reverse order, so the items in the list should be in the order they were retrieved from the stream. For example:
val stream = new SafeIterator[Char]("foobar") with Pushback[Char] val list = List(stream.next.get, stream.next.get) // At this point, the list contains ('f', 'o'), and the stream // contains "obar". stream.pushback(list) // Stream now contains "foobar"
- items
the items to push back.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )