1 package com.github.davidmoten.rx.internal.operators;
2
3 public final class NullSentinel {
4
5 private NullSentinel() {
6 // prevent instantiation
7 }
8
9 private static final Object NULL_SENTINEL = new Object();
10
11 public static boolean isNullSentinel(Object o) {
12 return o == NULL_SENTINEL;
13 }
14
15 @SuppressWarnings("unchecked")
16 public static <T> T instance() {
17 return (T) NULL_SENTINEL;
18 }
19
20 }