working on it ...

Filters

Explore Public Snippets

Sort by

Found 2 snippets

    public by code.universe  1811  0  5  0

    equalTo() - override

    equalTo() - override descr
    import org.apache.commons.lang3.builder.EqualsBuilder;
    
    class Cake {
    	String type;
    
    	public Cake(String type) {
    		this.type = type;
    
    	}
    
    	@Override
    	public boolean equals(Object obj) {
    		if (!(obj instanceof Cake)) {
    			return false;
    		} else if (obj == this) {
    			return true;
    		}
    
    		Cake rhs = (Cake) obj;
    		return new EqualsBuilder().append(type, rhs.type).isEquals();
    
    
    	}
    
    }

    public by terekhovm  3991  0  6  0

    equalTo() - override

    equalTo() - override descr
    import org.apache.commons.lang3.builder.EqualsBuilder;
    
    class Cake {
    	String type;
    
    	public Cake(String type) {
    		this.type = type;
    
    	}
    
    	@Override
    	public boolean equals(Object obj) {
    		if (!(obj instanceof Cake)) {
    			return false;
    		} else if (obj == this) {
    			return true;
    		}
    
    		Cake rhs = (Cake) obj;
    		return new EqualsBuilder().append(type, rhs.type).isEquals();
    
    
    	}
    
    }

    List Complete ( 2 snippets total )

    Cannot find what you were looking for?
    Ask the Snip2Code Community

    • Public Snippets
    • Channels Snippets