package h2o.common.util.lang;

public class Var<T> implements java.io.Serializable {	

	private static final long serialVersionUID = -8028944252330143592L;
	
	private volatile T var;
	
	public Var() {}
	
	public Var( T var ) {
		this.var = var;
	}

	public T getVar() {
		return var;
	}

	public void setVar(T var) {
		this.var = var;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((var == null) ? 0 : var.hashCode());
		return result;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Var other = (Var) obj;
		if (var == null) {
			if (other.var != null)
				return false;
		} else if (!var.equals(other.var))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return var == null ? null : var.toString();
	}
	
	
	

}

@@ -153,18 +153,16 @@
 2L;%0A
-%09
 %0A%09p
-rivate
+ublic
  vol
@@ -174,15 +174,15 @@
  T v
-ar;%0A%09%0A%09
+;%0A%0A    
 publ
@@ -191,21 +191,28 @@
  Var() %7B
-%7D%0A%09%0A%09
+%0A    %7D%0A%0A    
 public V
@@ -218,42 +218,46 @@
 Var(
- 
 T v
-ar 
 ) %7B%0A
-%09%09
+        
 this.v
-ar
  = v
-ar;%0A%09%7D%0A%0A%09
+;%0A    %7D%0A%0A    
 publ
@@ -269,34 +269,42 @@
 getV
-ar
 () %7B%0A
-%09%09return var;%0A%09%7D%0A%0A%09
+        return v;%0A    %7D%0A%0A    
 publ
@@ -319,43 +319,47 @@
 setV
-ar
 (T v
-ar
 ) %7B%0A
-%09%09
+        
 this.v
-ar
  = v
-ar;%0A%09%7D%0A%0A%09
+;%0A    %7D%0A%0A    
 @Ove
@@ -462,18 +462,16 @@
 lt + ((v
-ar
  == null
@@ -479,18 +479,16 @@
  ? 0 : v
-ar
 .hashCod
@@ -518,39 +518,8 @@
 %09%7D%0A%0A
-%09@SuppressWarnings(%22rawtypes%22)%0A
 %09@Ov
@@ -718,18 +718,16 @@
 %0A%09%09if (v
-ar
  == null
@@ -744,18 +744,16 @@
 (other.v
-ar
  != null
@@ -787,18 +787,16 @@
 e if (!v
-ar
 .equals(
@@ -802,18 +802,16 @@
 (other.v
-ar
 ))%0A%09%09%09re
@@ -890,18 +890,16 @@
 return v
-ar
  == null
@@ -909,18 +909,16 @@
 null : v
-ar
 .toStrin

修改 Var 内部变量名为 v