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