Class NotUsed

java.lang.Object
org.apache.pekko.NotUsed
Direct Known Subclasses:
NotUsed$

public abstract class NotUsed extends Object
This type is used in generic type signatures wherever the actual value is of no importance. It is a combination of Scala’s Unit and Java’s Void, which both have different issues when used from the other language. An example use-case is the materialized value of a Pekko Stream for cases where no result shall be returned from materialization.
  • Constructor Details

    • NotUsed

      public NotUsed()
  • Method Details

    • getInstance

      public static NotUsed getInstance()
      Java API: the singleton instance
    • notUsed

      public static NotUsed notUsed()
      Java API: the singleton instance

      This is equivalent to NotUsed.getInstance, but can be used with static import.

    • productPrefix

      public static String productPrefix()
    • productArity

      public static int productArity()
    • productElement

      public static Object productElement(int x$1)
    • productIterator

      public static scala.collection.Iterator<Object> productIterator()
    • canEqual

      public static boolean canEqual(Object x$1)
    • hashCode

      public static int hashCode()
    • toString

      public static String toString()
    • equals

      public abstract static boolean equals(Object that)
    • productElementName

      public static String productElementName(int n)
    • productElementNames

      public static scala.collection.Iterator<String> productElementNames()