@@ -0,0 +1,2098 @@
+/*%0A * Copyright (C) 2016 The Android Open Source Project%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.google.android.cameraview;%0A%0Aimport android.support.annotation.NonNull;%0A%0A/**%0A * Immutable class for describing width and height dimensions in pixels.%0A */%0Apublic class Size implements Comparable%3CSize%3E %7B%0A%0A    private final int mWidth;%0A    private final int mHeight;%0A%0A    /**%0A     * Create a new immutable Size instance.%0A     *%0A     * @param width  The width of the size, in pixels%0A     * @param height The height of the size, in pixels%0A     */%0A    public Size(int width, int height) %7B%0A        mWidth = width;%0A        mHeight = height;%0A    %7D%0A%0A    public int getWidth() %7B%0A        return mWidth;%0A    %7D%0A%0A    public int getHeight() %7B%0A        return mHeight;%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object o) %7B%0A        if (o == null) %7B%0A            return false;%0A        %7D%0A        if (this == o) %7B%0A            return true;%0A        %7D%0A        if (o instanceof Size) %7B%0A            Size size = (Size) o;%0A            return mWidth == size.mWidth && mHeight == size.mHeight;%0A        %7D%0A        return false;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return mWidth + %22x%22 + mHeight;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        // assuming most sizes are %3C2%5E16, doing a rotate will give us perfect hashing%0A        return mHeight %5E ((mWidth %3C%3C (Integer.SIZE / 2)) %7C (mWidth %3E%3E%3E (Integer.SIZE / 2)));%0A    %7D%0A%0A    @Override%0A    public int compareTo(@NonNull Size another) %7B%0A        return mWidth * mHeight - another.mWidth * another.mHeight;%0A    %7D%0A%0A%7D%0A

Create Size.java