View Javadoc

1   /*
2    * $Id: VoidResult.java 10489 2008-01-23 17:53:38Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule;
12  
13  import java.io.ObjectStreamException;
14  import java.io.Serializable;
15  
16  // @Immutable
17  public final class VoidResult implements Serializable
18  {
19      /**
20       * Serial version
21       */
22      private static final long serialVersionUID = -3828573682818093673L;
23  
24      private static class VoidResultHolder
25      {
26          private static final VoidResult instance = new VoidResult();
27      }
28  
29      public static VoidResult getInstance()
30      {
31          return VoidResultHolder.instance;
32      }
33  
34      private VoidResult()
35      {
36          super();
37      }
38  
39      private Object readResolve() throws ObjectStreamException
40      {
41          return VoidResultHolder.instance;
42      }
43  
44      // @Override
45      public boolean equals(Object obj)
46      {
47          return obj instanceof VoidResult;
48      }
49  
50      // @Override
51      public int hashCode ()
52      {
53          return 0;
54      }
55  
56      // @Override
57      public String toString()
58      {
59          return "{VoidResult}";
60      }
61  
62  }