Java, I need a value to represent undefined (undefined state), which is used in a streaming check set, and null itself has a special meaning. I hope that the undefined / ungiven value in the flow is equivalent to null, but it can also be judged that it is different from the normal null if necessary, and if the whole process does not care about this particular value, then it should be null.
I can distinguish by a custom object, such as defining the constant public static final Object UNDEF = new String (")
. When the source does not give a value, a subsequent link can easily compare the value with it with an equals sign, but the empty string may be misunderstood during a non-self-defined process. (Xxx) null
has been tried, but null cannot use instanceof to determine true. So I just want to ask you if you have any suggestions?