public ObjectIterator(Object object) {
        if (object == null) {
            this.iterator = new EmptyIterator();
        } else if (object instanceof List) {
            this.iterator = ((List) object).iterator();
        } else if (object instanceof Map) {
            this.iterator = ((Map) object).entrySet().iterator();
        } else if (object instanceof ArrayWrapper) {
            this.iterator = new ArrayIterator(((ArrayWrapper) object).getArray());
        } else if (object instanceof Object[]) {
            this.iterator = new ArrayIterator((Object[]) object);
        } else if (object instanceof Boolean) {
            this.iterator = new BoolIterator((Boolean) object);
        } else if (object instanceof Number) {
            this.iterator = new DigitIterator(((Number) object).doubleValue());
        } else {
            this.iterator = new EmptyIterator();
        }
    }