/******************************************************************************* * Copyright (c) 2015 EclipseSource and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * EclipseSource - initial API and implementation ******************************************************************************/ package org.eclipse.rap.rwt.internal.theme; import java.io.Serializable; public class Size implements Serializable { public final int width; public final int height; public Size( int width, int height ) { this.width = width; this.height = height; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + height; result = prime * result + width; return result; } @Override public boolean equals( Object obj ) { if( this == obj ) { return true; } if( obj == null ) { return false; } if( getClass() != obj.getClass() ) { return false; } Size other = ( Size )obj; if( height != other.height ) { return false; } if( width != other.width ) { return false; } return true; } }