public boolean isDirectoryAtPath(String path) { BooleanPtr ptr = new BooleanPtr(); fileExists(path, ptr); return ptr.get(); }
/** * Copies {@code src.length} {@code boolean}s from {@code src} to the memory * pointed to by this {@link BooleanPtr}. * * @param src the source. */ public void set(boolean[] src) { set(src, 0, src.length); }
/** * Returns the current value. * * @return the value. */ public boolean get() { return getByte() != 0; }
/** * Copies {@code n} {@code boolean}s from the memory pointed to by this * {@link BooleanPtr} to a new {@code boolean[]} instance. * * @param n the number of {@code boolean}s to copy. * @return the {@code boolean[]}. */ public boolean[] toBooleanArray(int n) { boolean[] result = new boolean[n]; get(result); return result; }
/** * Copies {@code count} {@code boolean}s from the memory pointed to by this * {@link BooleanPtr} to {@code dst} starting at offset {@code offset}. * * @param dst the destination. * @param offset the offset within the destination array to start copying * to. * @param count the number of elements to copy. */ public void get(boolean[] dst, int offset, int count) { Arrays.checkOffsetAndCount(dst.length, offset, count); long h = getHandle(); for (int i = 0; i < count; i++) { dst[i + offset] = VM.getByte(h++) != 0; } }
/** * Sets the value. * * @param value the new value. */ public void set(boolean value) { setByte((byte) (value ? 1 : 0)); }
public NSURL(NSData bookmarkData, NSURLBookmarkResolutionOptions options, NSURL relativeURL) throws NSErrorException { this(bookmarkData, options, relativeURL, new BooleanPtr()); } /*<constructors>*/
/** * Copies {@code dst.length} bytes from the memory pointed to by this * {@link BooleanPtr} to {@code dst}. * * @param dst the destination. */ public void get(boolean[] dst) { get(dst, 0, dst.length); }
/** * Copies {@code count} {@code boolean}s from {@code src} starting at offset * {@code offset} to the memory pointed to by this {@link BooleanPtr}. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(boolean[] src, int offset, int count) { Arrays.checkOffsetAndCount(src.length, offset, count); long h = getHandle(); for (int i = 0; i < count; i++) { VM.setByte(h++, (byte) (src[i + offset] ? 1 : 0)); } } }
/** * Sets the value. * * @param value the new value. */ public void set(boolean value) { setByte((byte) (value ? 1 : 0)); }
public boolean hasBoolean(String key) { BooleanPtr ptr = new BooleanPtr(); return getBoolean(key, ptr); } /**
public boolean hasBooleanValue(String key) { BooleanPtr ptr = new BooleanPtr(); getAppBooleanValue(key, applicationID, ptr); return ptr.get(); } public long getLongValue(String key) {
/** * Creates a new {@link BooleanPtr} and initializes it with the specified * value. * * @param value the value. */ public BooleanPtr(boolean value) { set(value); }
@Override public void invoke(NSString a, NSObject b, BooleanPtr c) { block.invoke(MPMediaEntityProperty.valueOf(a), b, c.get()); } });
/** * Copies {@code count} {@code boolean}s from the memory pointed to by this * {@link BooleanPtr} to {@code dst} starting at offset {@code offset}. * * @param dst the destination. * @param offset the offset within the destination array to start copying * to. * @param count the number of elements to copy. */ public void get(boolean[] dst, int offset, int count) { Arrays.checkOffsetAndCount(dst.length, offset, count); long h = getHandle(); for (int i = 0; i < count; i++) { dst[i + offset] = VM.getByte(h++) != 0; } }
/** * Returns the current value. * * @return the value. */ public boolean get() { return getByte() != 0; }
/** * Sets the value. * * @param value the new value. */ public void set(boolean value) { setByte((byte) (value ? 1 : 0)); }
public boolean hasBoolean(long index) { BooleanPtr ptr = new BooleanPtr(); return getBoolean(index, ptr); } /**
/** * @since Available in iOS 2.0 and later. */ public boolean popBoolean() { BooleanPtr ptr = new BooleanPtr(); if (popBoolean(ptr)) { return ptr.get(); } return false; } /**
@Override public void invoke(NSObject a, Long b, BooleanPtr c) { c.set(block.invoke((T)a, b)); } });