Java tutorial
//package com.java2s; //License from project: Apache License import java.util.ArrayList; public class Main { public static boolean isScalar(ArrayList<?> shape) { if (shape != null) { for (int i = 0; i < shape.size(); i++) { if (null == shape.get(i) || !("1").equals(shape.get(i).toString())) { return false; } } } return true; } }