Class/Object

com.fulcrumgenomics.commons

CommonsDef

Related Docs: object CommonsDef | package commons

Permalink

class CommonsDef extends AnyRef

Object that is designed to be imported with import CommonsDef._ in any/all classes much like the way that scala.PreDef is imported in all files automatically.

New methods, types and objects should not be added to this class lightly as they will pollute the namespace of any classes which import it.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CommonsDef
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CommonsDef()

    Permalink

Type Members

  1. implicit class BetterBufferedIteratorJavaWrapper[A] extends AnyRef

    Permalink

    Implicit class that provides a method to wrap a Java iterator into a BetterBufferedIterator.

  2. implicit class BetterBufferedIteratorScalaWrapper[A] extends AnyRef

    Permalink

    Implicit class that provides a method to wrap an iterator into a BetterBufferedIterator.

  3. type DirPath = Path

    Permalink

    Represents a path to directory.

  4. trait DualIterator[A] extends Iterator[A] with Iterator[A]

    Permalink

    A trait that combine's scala's Iterator with Java's Iterator.

  5. type FilePath = Path

    Permalink

    Represents a path to a file (not a directory) that doesn't have a more specific type.

  6. type FilenamePrefix = String

    Permalink

    A String that represents the prefix or basename of a filename.

  7. implicit class IteratorToJavaCollectionsAdapter[A] extends AnyRef

    Permalink

    Implicit class that provides methods for creating Java collections from an Iterator.

  8. implicit class MaxNBy[A] extends AnyRef

    Permalink
  9. implicit class ParSupport[A, B <: ParIterableLike[_, _, _]] extends AnyRef

    Permalink

    Implicit that provides additional methods to any collection that is Parallelizable.

    Implicit that provides additional methods to any collection that is Parallelizable. Introduces parWith() methods that create parallel versions of the collection with various configuration options.

    A

    the type of the elements in the collection

    B

    the type of the parallel representation of the collection

  10. type PathPrefix = Path

    Permalink

    Represents a full path including directories, that is intended to be used as a prefix for generating file paths.

  11. type PathToBam = Path

    Permalink

    Represents a path to a BAM (or SAM or CRAM) file.

  12. type PathToFasta = Path

    Permalink

    Represents a path to a Reference FASTA file.

  13. type PathToFastq = Path

    Permalink

    Represents a path to a FASTQ file (optionally gzipped).

  14. type PathToIntervals = Path

    Permalink

    Represents a path to an intervals file (IntervalList or BED).

  15. type PathToVcf = Path

    Permalink

    Represents a path to a VCF/BCF/VCF.gz.

  16. implicit class SafelyClosable extends AnyRef

    Permalink

    Implicit class that wraps a closeable and provides a safelyClose method that will not throw any exception.

  17. implicit class SumBy[A] extends AnyRef

    Permalink

    Implicit that provides additional methods to sum the values of a sequence after applying a mapping to the items.

    Implicit that provides additional methods to sum the values of a sequence after applying a mapping to the items. This has the benefit of not creating any intermediate collections or iterators. The mapping must map to a Numeric type.

    A

    the type of items to transform.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to any2stringadd[CommonsDef] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (CommonsDef, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to ArrowAssoc[CommonsDef] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def ensuring(cond: (CommonsDef) ⇒ Boolean, msg: ⇒ Any): CommonsDef

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to Ensuring[CommonsDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (CommonsDef) ⇒ Boolean): CommonsDef

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to Ensuring[CommonsDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): CommonsDef

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to Ensuring[CommonsDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): CommonsDef

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to Ensuring[CommonsDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def forloop[T](from: T)(check: (T) ⇒ Boolean)(next: (T) ⇒ T)(f: (T) ⇒ Unit): Unit

    Permalink

    A more generic for loop, that gives performance similar, but slightly worse than, CommonsDef#forloop(Int,Int,Int).

    A more generic for loop, that gives performance similar, but slightly worse than, CommonsDef#forloop(Int,Int,Int). Equivalent to:

    for (i=from; check(i); i=next(i)) f(i)

    T

    the type of the index

    from

    an initial value

    check

    a function that checks to see if a value should be evaluated (not cause termination)

    next

    a function that takes a value and produced the next value

    f

    a function called on all values

    Annotations
    @inline()
  16. def forloop(from: Int, until: Int, by: Int = 1)(f: (Int) ⇒ Unit): Unit

    Permalink

    An implementation of a for loop that has performance similar to writing a custom while loop for primitive types, which suffer great performance loss when iterating via foreach(), and especially with zipWithIndex.foreach().

    An implementation of a for loop that has performance similar to writing a custom while loop for primitive types, which suffer great performance loss when iterating via foreach(), and especially with zipWithIndex.foreach().

    Equivalent to: for(int i=from; i<until; i+=by) f(i)

    from

    an initial integer values

    until

    a value one higher than the last value that should be accepted

    by

    a step value to increment by each iteration

    f

    a function that takes the index and is called each iteration

    Annotations
    @inline()
  17. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to StringFormat[CommonsDef] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. implicit def javaIterableToIterator[A](iterable: Iterable[A]): Iterator[A]

    Permalink

    Implicit that converts a Java Iterable into a scala Iterator.

  22. implicit def javaIteratorAsScalaIterator[A](iterator: Iterator[A]): DualIterator[A]

    Permalink

    Implicit that wraps a Java iterator as a Scala iterator.

  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. implicit def scalaIteratorAsJavaIterator[A](iterator: Iterator[A]): DualIterator[A]

    Permalink

    Implicit that wraps a Scala iterator as a Java iterator.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. def tryWith[A, B](resource: A, logger: Option[Logger] = None)(cleanup: (A) ⇒ Unit)(doWork: (A) ⇒ B): Try[B]

    Permalink

    Performs the unit of work on a resource of type A cleaning up the resource in the case of an exception or upon completion, and ultimately returning a Try of type B.

    Performs the unit of work on a resource of type A cleaning up the resource in the case of an exception or upon completion, and ultimately returning a Try of type B. An exception during cleanup does not change the success of the work. If a logger is provided, the exception is logged, otherwise the exception is ignored.

    An example would be:

    tryWith(Io.toWriter("/path/does/not/exists")(_.close()) { writer => writer.write("Hello World!")) }

    which throws an exception since the path is not found, but this exception is ignored, and a Failure is returned.

    A

    the resource type.

    B

    the result type of the work performed.

    resource

    the resource upon which work is performed.

    cleanup

    the clean up method to apply to the resource when the work is complete.

    doWork

    the work to perform on the resource, returning a result of type B.

    returns

    Success if the work was performed successfully, Failure otherwise.

  30. def tryWithCloseable[A <: Closeable](resource: A, logger: Option[Logger] = None)(doWork: (A) ⇒ Unit): Try[Unit]

    Permalink

    Performs the unit of work on a closeable resource of type A closing up the resource in the case of an exception or upon completion, and ultimately returning a Try.

    Performs the unit of work on a closeable resource of type A closing up the resource in the case of an exception or upon completion, and ultimately returning a Try. An exception during closing does not change the success of the work. If a logger is provided, the exception is logged, otherwise the exception is ignored.

    An example would be:

    tryWith(Io.toWriter("/path/does/not/exists") { writer => writer.write("Hello World!")) }

    which throws an exception since the path is not found, but this exception is ignored, and a Failure is returned.

    A

    the resource type.

    resource

    the resource upon which work is performed.

    doWork

    the work to perform on the resource.

    returns

    Success if the work was performed successfully, Failure otherwise.

  31. def unreachable(message: ⇒ String = ""): Nothing

    Permalink

    A terse way to throw an UnreachableException that can be used where any type is expected, e.g.

    A terse way to throw an UnreachableException that can be used where any type is expected, e.g. Option(thing) getOrElse unreachable("my thing is never null")

    message

    an optional message

  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def yieldAndThen[A](it: ⇒ A)(block: ⇒ Unit): A

    Permalink

    Construct to capture a value, execute some code, and then returned the captured value.

    Construct to capture a value, execute some code, and then returned the captured value. Allows code like: val x = foo; foo +=1; return x to be replaced with yieldAndThen(foo) {foo +=1}

    A

    the type of thing to be returned (usually inferred)

    it

    the value to be returned/yielded

    block

    a block of code to be evaluated

    returns

    it

  36. def [B](y: B): (CommonsDef, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to ArrowAssoc[CommonsDef] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from CommonsDef to any2stringadd[CommonsDef]

Inherited by implicit conversion StringFormat from CommonsDef to StringFormat[CommonsDef]

Inherited by implicit conversion Ensuring from CommonsDef to Ensuring[CommonsDef]

Inherited by implicit conversion ArrowAssoc from CommonsDef to ArrowAssoc[CommonsDef]

Ungrouped