/** * @since Available in iOS 4.0 and later. */ public char getStartChar() { if (has(Keys.StartChar())) { CFNumber val = get(Keys.StartChar(), CFNumber.class); return val.charValue(); } return 0; } /**
public CFComparisonResult compareTo(CFNumber otherNumber) { return compareTo(otherNumber, null); } /*<methods>*/
public static CFNumber valueOf(int value) { return create(null, CFNumberType.SInt32Type, new IntPtr(value).as(VoidPtr.class)); } public static CFNumber valueOf(long value) {
/** * @since Available in iOS 4.0 and later. */ public short getBlue() { if (has(Keys.Blue())) { CFNumber val = get(Keys.Blue(), CFNumber.class); return val.shortValue(); } return 0; } /**
public byte byteValue() { VoidPtr ptr = new VoidPtr(); getValue(CFNumberType.SInt8Type, ptr); return ptr.as(BytePtr.class).get(); } public short shortValue() {
/** * @since Available in iOS 3.2 and later. */ public float getKern() { if (has(CTAttributedStringAttribute.Kern)) { CFNumber val = get(CTAttributedStringAttribute.Kern, CFNumber.class); return val.floatValue(); } return 0; } /**
public double getNumber(CGImagePropertyNikon property) { if (has(property)) { CFNumber val = get(property, CFNumber.class); return val.doubleValue(); } return 0; } public CGImagePropertyNikonData set(CGImagePropertyNikon property, String value) {
public boolean booleanValue() { int b = intValue(); if (b == 0) return false; return true; } public static CFNumber valueOf(byte value) {
/** * @since Available in iOS 4.3 and later. */ public long getGradualDecoderRefresh() { if (has(CMSampleBufferAttachmentKey.GradualDecoderRefresh)) { CFNumber val = get(CMSampleBufferAttachmentKey.GradualDecoderRefresh, CFNumber.class); return val.longValue(); } return 0; } /**
public static /*<name>*/ABPersonKind/*</name>*/ valueOf(/*<type>*/CFNumber/*</type>*/ value) { for (/*<name>*/ABPersonKind/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/ABPersonKind/*</name>*/.class.getName()); }
/** * @since Available in iOS 4.0 and later. */ public short getRed() { if (has(Keys.Red())) { CFNumber val = get(Keys.Red(), CFNumber.class); return val.shortValue(); } return 0; } /**
public char charValue() { VoidPtr ptr = new VoidPtr(); getValue(CFNumberType.SInt16Type, ptr); return ptr.as(CharPtr.class).get(); } public int intValue() {
/** * @since Available in iOS 3.2 and later. */ public float getSize() { if (has(CTFontAttribute.Size)) { CFNumber val = get(CTFontAttribute.Size, CFNumber.class); return val.floatValue(); } return 0; } /**
/** * @since Available in iOS 4.0 and later. */ public double getSpeedMultiplier() { if (has(CMSampleBufferAttachmentKey.SpeedMultiplier)) { CFNumber val = get(CMSampleBufferAttachmentKey.SpeedMultiplier, CFNumber.class); return val.doubleValue(); } return 0; } /**
/** * @since Available in iOS 4.0 and later. */ public int getTemporalQuality() { if (has(Keys.TemporalQuality())) { CFNumber val = get(Keys.TemporalQuality(), CFNumber.class); return val.intValue(); } return 0; } /**
/** * @since Available in iOS 4.0 and later. */ public long getBytesPerRowAlignment() { if (has(CVPixelBufferAttribute.BytesPerRowAlignment)) { CFNumber val = get(CVPixelBufferAttribute.BytesPerRowAlignment, CFNumber.class); return val.longValue(); } return 0; } /**
public static /*<name>*/ABPersonKind/*</name>*/ valueOf(/*<type>*/CFNumber/*</type>*/ value) { for (/*<name>*/ABPersonKind/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/ABPersonKind/*</name>*/.class.getName()); }
public static CFNumber valueOf(double value) { return create(null, CFNumberType.Float64Type, new DoublePtr(value).as(VoidPtr.class)); } public static CFNumber valueOf(boolean value) {
/** * @since Available in iOS 4.0 and later. */ public short getGreen() { if (has(Keys.Green())) { CFNumber val = get(Keys.Green(), CFNumber.class); return val.shortValue(); } return 0; } /**
public int intValue() { VoidPtr ptr = new VoidPtr(); getValue(CFNumberType.SInt32Type, ptr); return ptr.as(IntPtr.class).get(); } public long longValue() {