/*
 * Copyright © 2014 <code@io7m.com> http://io7m.com
 * 
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

package com.io7m.jfunctional;

import java.io.Serializable;

import com.io7m.jequality.annotations.EqualityStructural;
import com.io7m.jnull.Nullable;

/**
 * <p>
 * The single-valued unit type.
 * </p>
 */

@EqualityStructural public final class Unit implements Serializable
{
  private static final long serialVersionUID = -9037394631765247295L;
  private static final Unit UNIT             = new Unit();

  /**
   * The hash code for the {@link Unit} type.
   */

  public static final int   UNIT_HASH_CODE   = 0xFACECAFE;

  /**
   * @return The unit value
   */

  public static Unit unit()
  {
    return Unit.UNIT;
  }

  private Unit()
  {

  }

  @Override public boolean equals(
    final @Nullable Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (this.getClass() != obj.getClass()) {
      return false;
    }
    return true;
  }

  @Override public int hashCode()
  {
    return Unit.UNIT_HASH_CODE;
  }
}

@@ -822,38 +822,8 @@
 l;%0A%0A
-import java.io.Serializable;%0A%0A
 impo
@@ -909,16 +909,46 @@
 lable;%0A%0A
+import java.io.Serializable;%0A%0A
 /**%0A * %3C
@@ -1014,17 +1014,17 @@
 ructural
- 
+%0A
 public f
@@ -1168,28 +1168,16 @@
 it UNIT 
-            
 = new Un
@@ -1268,18 +1268,16 @@
 nal int 
-  
 UNIT_HAS
@@ -1283,18 +1283,16 @@
 SH_CODE 
-  
 = 0xFACE
@@ -1428,32 +1428,34 @@
   %7D%0A%0A  @Override
+%0A 
  public boolean 
@@ -1498,28 +1498,31 @@
 bj)%0A  %7B%0A    
-if (
+return 
 this == obj)
@@ -1524,94 +1524,27 @@
  obj
-) %7B%0A      return true;%0A    %7D%0A    if (
+ %7C%7C 
 obj 
-=
+!
 = null
-) %7B%0A      return false;%0A    %7D%0A    if (
+ && 
 this
@@ -1555,17 +1555,17 @@
 Class() 
-!
+=
 = obj.ge
@@ -1576,53 +1576,8 @@
 ss()
-) %7B%0A      return false;%0A    %7D%0A    return true
 ;%0A  
@@ -1590,16 +1590,18 @@
 Override
+%0A 
  public 

Reformat code and simplify equality