package org.opengroupware.jope.foundation;

public final class NSNull {

  public static final NSNull nullObject = new NSNull();
  
  /* some methods */
  
  public boolean isNull() {
    return true;
  }
  public boolean isNotNull() {
    return false;
  }
  public boolean isEmpty() {
    return true;
  }
  public boolean isNotEmpty() {
    return false;
  }
  
  public boolean equals(Object _other) {
    return _other == null || _other == this || _other instanceof NSNull;
  }
  
  /* interface */
  
  public static interface NSNullDetection {
    
    public boolean isNull();
    public boolean isNotNull();
    public boolean isEmpty();
    public boolean isNotEmpty();
    
  }
}
