001
014
015 package com.liferay.portal.kernel.mobile.device;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.StringBundler;
020
021 import java.io.Serializable;
022
023
026 @ProviderType
027 public class Dimensions implements Serializable {
028
029 public static final Dimensions UNKNOWN = new Dimensions(-1, -1);
030
031 public Dimensions(float height, float width) {
032 _height = height;
033 _width = width;
034 }
035
036 public float getHeight() {
037 return _height;
038 }
039
040 public float getWidth() {
041 return _width;
042 }
043
044 @Override
045 public String toString() {
046 StringBundler sb = new StringBundler(5);
047
048 sb.append("{height=");
049 sb.append(_height);
050 sb.append(", width=");
051 sb.append(_width);
052 sb.append("}");
053
054 return sb.toString();
055 }
056
057 private final float _height;
058 private final float _width;
059
060 }