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