public boolean has(CTAttributedStringAttribute key) { return data.containsKey(key.value()); } public <T extends NativeObject> T get(CTAttributedStringAttribute key, Class<T> type) {
@MarshalsPointer public static CTAttributedStringAttribute toObject(Class<CTAttributedStringAttribute> cls, long handle, long flags) { CFString o = (CFString) CFType.Marshaler.toObject(CFString.class, handle, flags); if (o == null) { return null; } return CTAttributedStringAttribute.valueOf(o); } @MarshalsPointer
public static /*<name>*/CTAttributedStringAttribute/*</name>*/ valueOf(/*<type>*/CFString/*</type>*/ value) { for (/*<name>*/CTAttributedStringAttribute/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/CTAttributedStringAttribute/*</name>*/.class.getName()); }
@MarshalsPointer public static List<CTAttributedStringAttribute> toObject(Class<? extends CFType> cls, long handle, long flags) { CFArray o = (CFArray) CFType.Marshaler.toObject(CFArray.class, handle, flags); if (o == null) { return null; } List<CTAttributedStringAttribute> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(CTAttributedStringAttribute.valueOf(o.get(i, CFString.class))); } return list; } @MarshalsPointer
public CTAttributedStringAttributes set(CTAttributedStringAttribute key, NativeObject value) { data.put(key.value(), value); return this; }
@MarshalsPointer public static CTAttributedStringAttribute toObject(Class<CTAttributedStringAttribute> cls, long handle, long flags) { CFString o = (CFString) CFType.Marshaler.toObject(CFString.class, handle, flags); if (o == null) { return null; } return CTAttributedStringAttribute.valueOf(o); } @MarshalsPointer
@WeaklyLinked public CFType getAttribute(long loc, CTAttributedStringAttribute attrName, CFRange effectiveRange) { if (attrName == null) { throw new NullPointerException("attrName"); } return getAttribute(loc, attrName.value(), effectiveRange); } @WeaklyLinked
@MarshalsPointer public static CTAttributedStringAttribute toObject(Class<CTAttributedStringAttribute> cls, long handle, long flags) { CFString o = (CFString) CFType.Marshaler.toObject(CFString.class, handle, flags); if (o == null) { return null; } return CTAttributedStringAttribute.valueOf(o); } @MarshalsPointer
public <T extends NativeObject> T get(CTAttributedStringAttribute key, Class<T> type) { if (has(key)) { return data.get(key.value(), type); } return null; } public CTAttributedStringAttributes set(CTAttributedStringAttribute key, NativeObject value) {
@MarshalsPointer public static List<CTAttributedStringAttribute> toObject(Class<? extends CFType> cls, long handle, long flags) { CFArray o = (CFArray) CFType.Marshaler.toObject(CFArray.class, handle, flags); if (o == null) { return null; } List<CTAttributedStringAttribute> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(CTAttributedStringAttribute.valueOf(o.get(i, CFString.class))); } return list; } @MarshalsPointer
@MarshalsPointer public static long toNative(CTAttributedStringAttribute o, long flags) { if (o == null) { return 0L; } return CFType.Marshaler.toNative(o.value(), flags); } }
@MarshalsPointer public static List<CTAttributedStringAttribute> toObject(Class<? extends CFType> cls, long handle, long flags) { CFArray o = (CFArray) CFType.Marshaler.toObject(CFArray.class, handle, flags); if (o == null) { return null; } List<CTAttributedStringAttribute> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(CTAttributedStringAttribute.valueOf(o.get(i, CFString.class))); } return list; } @MarshalsPointer
public void removeAttribute(CTAttributedStringAttribute attribute, @ByVal NSRange range) { if (attribute == null) { throw new NullPointerException("attribute"); } removeAttribute(attribute.value().as(NSString.class), range); }
public void addAttribute(CTAttributedStringAttribute attribute, NSObject value, @ByVal NSRange range) { if (attribute == null) { throw new NullPointerException("attribute"); } addAttribute(attribute.value().as(NSString.class), value, range); }
@WeaklyLinked public NSObject getAttribute(CTAttributedStringAttribute attribute, @MachineSizedUInt long location, NSRange range) { if (attribute == null) { throw new NullPointerException("attribute"); } return getAttribute(attribute.value().as(NSString.class), location, range); } @WeaklyLinked
/** * @since Available in iOS 4.0 and later. */ @WeaklyLinked public void enumerateAttribute(CTAttributedStringAttribute attribute, @ByVal NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, final VoidBlock3<NSObject, NSRange, BooleanPtr> block) { if (attribute == null) { throw new NullPointerException("attribute"); } enumerateAttribute(attribute.value().as(NSString.class), enumerationRange, opts, block); }
@WeaklyLinked public NSObject getAttribute(CTAttributedStringAttribute attribute, @MachineSizedUInt long location, NSRange range, @ByVal NSRange rangeLimit) { if (attribute == null) { throw new NullPointerException("attribute"); } return getAttribute(attribute.value().as(NSString.class), location, range, rangeLimit); } @WeaklyLinked
@MarshalsPointer public static long toNative(List<CTAttributedStringAttribute> l, long flags) { if (l == null) { return 0L; } CFArray array = CFMutableArray.create(); for (CTAttributedStringAttribute o : l) { array.add(o.value()); } return CFType.Marshaler.toNative(array, flags); } }
public static /*<name>*/CTAttributedStringAttribute/*</name>*/ valueOf(/*<type>*/CFString/*</type>*/ value) { for (/*<name>*/CTAttributedStringAttribute/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/CTAttributedStringAttribute/*</name>*/.class.getName()); }
public static /*<name>*/CTAttributedStringAttribute/*</name>*/ valueOf(/*<type>*/CFString/*</type>*/ value) { for (/*<name>*/CTAttributedStringAttribute/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/CTAttributedStringAttribute/*</name>*/.class.getName()); }