Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Iterator;
import java.util.List;
import android.hardware.Camera.Size;

public class Main {
    public static boolean containsSize(List<Size> sizes, Size size) {
        for (Iterator<Size> iterator = sizes.iterator(); iterator.hasNext();) {
            Size currSize = iterator.next();
            if (currSize.width == size.width && currSize.height == size.height) {
                return true;
            }
        }
        return false;
    }
}