cgta.oscala.extensions.IteratorExtensions.scala Maven / Gradle / Ivy
The newest version!
package cgta.oscala
package extensions
//////////////////////////////////////////////////////////////
// Copyright (c) 2014 Ben Jackman, Jeff Gomberg
// All Rights Reserved
// please contact [email protected] or [email protected]
// for licensing inquiries
// Created by bjackman @ 8/14/14 8:17 PM
//////////////////////////////////////////////////////////////
class IteratorExtensions[A](val itr: Iterator[A]) extends AnyVal {
def nextOption() : Option[A] = if (itr.hasNext) Some(itr.next()) else None
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy