public static /*<name>*/MPMediaEntityProperty/*</name>*/ valueOf(/*<type>*/NSString/*</type>*/ value) { for (/*<name>*/MPMediaEntityProperty/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/MPMediaEntityProperty/*</name>*/.class.getName()); }
public MPMediaEntityProperty getProperty() { return MPMediaEntityProperty.valueOf(getPropertyName()); } public static MPMediaPropertyPredicate create(MPMediaEntityProperty property, NSObject value) {
public boolean has(MPMediaEntityProperty key) { return data.containsKey(key.value()); } public NSObject get(MPMediaEntityProperty key) {
@Override public void invoke(NSString a, NSObject b, BooleanPtr c) { block.invoke(MPMediaEntityProperty.valueOf(a), b, c.get()); } });
public MPNowPlayingInfo set(MPMediaEntityProperty key, NSObject value) { data.put(key.value(), value); return this; }
@MarshalsPointer public static MPMediaEntityProperty toObject(Class<MPMediaEntityProperty> cls, long handle, long flags) { NSString o = (NSString) NSObject.Marshaler.toObject(NSString.class, handle, flags); if (o == null) { return null; } return MPMediaEntityProperty.valueOf(o); } @MarshalsPointer
public static MPMediaPropertyPredicate create(MPMediaEntityProperty property, NSObject value) { return create(value, property.value()); } public static MPMediaPropertyPredicate create(MPMediaEntityProperty property, NSObject value, MPMediaPredicateComparison comparisonType) {
@SuppressWarnings("unchecked") @MarshalsPointer public static List<MPMediaEntityProperty> toObject(Class<? extends NSObject> cls, long handle, long flags) { NSArray<NSString> o = (NSArray<NSString>) NSObject.Marshaler.toObject(NSArray.class, handle, flags); if (o == null) { return null; } List<MPMediaEntityProperty> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(MPMediaEntityProperty.valueOf(o.get(i))); } return list; } @MarshalsPointer
public static MPMediaPropertyPredicate create(MPMediaEntityProperty property, NSObject value, MPMediaPredicateComparison comparisonType) { return create(value, property.value(), comparisonType); } /*<properties>*/
public MPMediaEntityProperty getProperty() { return MPMediaEntityProperty.valueOf(getPropertyName()); } public static MPMediaPropertyPredicate create(MPMediaEntityProperty property, NSObject value) {
@MarshalsPointer public static long toNative(MPMediaEntityProperty o, long flags) { if (o == null) { return 0L; } return NSObject.Marshaler.toNative(o.value(), flags); } }
public MPMediaEntityProperty getProperty() { return MPMediaEntityProperty.valueOf(getPropertyName()); } public static MPMediaPropertyPredicate create(MPMediaEntityProperty property, NSObject value) {
public NSObject get(MPMediaEntityProperty key) { if (has(key)) { return data.get(key.value()); } return null; } public MPNowPlayingInfo set(MPMediaEntityProperty key, NSObject value) {
@Override public void invoke(NSString a, NSObject b, BooleanPtr c) { block.invoke(MPMediaEntityProperty.valueOf(a), b, c.get()); } });
/** * @since Available in iOS 4.0 and later. */ public void enumerateValues(List<MPMediaEntityProperty> properties, final VoidBlock3<MPMediaEntityProperty, NSObject, Boolean> block) { NSSet<NSString> set = new NSMutableSet<>(); for (MPMediaEntityProperty property : properties) { set.add(property.value()); } enumerateValues(set, new VoidBlock3<NSString, NSObject, BooleanPtr>() { @Override public void invoke(NSString a, NSObject b, BooleanPtr c) { block.invoke(MPMediaEntityProperty.valueOf(a), b, c.get()); } }); } /*<methods>*/
@MarshalsPointer public static MPMediaEntityProperty toObject(Class<MPMediaEntityProperty> cls, long handle, long flags) { NSString o = (NSString) NSObject.Marshaler.toObject(NSString.class, handle, flags); if (o == null) { return null; } return MPMediaEntityProperty.valueOf(o); } @MarshalsPointer
@MarshalsPointer public static long toNative(List<MPMediaEntityProperty> l, long flags) { if (l == null) { return 0L; } NSArray<NSString> array = new NSMutableArray<>(); for (MPMediaEntityProperty o : l) { array.add(o.value()); } return NSObject.Marshaler.toNative(array, flags); } }
@Override public void invoke(NSString a, NSObject b, BooleanPtr c) { block.invoke(MPMediaEntityProperty.valueOf(a), b, c.get()); } });
public static /*<name>*/MPMediaEntityProperty/*</name>*/ valueOf(/*<type>*/NSString/*</type>*/ value) { for (/*<name>*/MPMediaEntityProperty/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/MPMediaEntityProperty/*</name>*/.class.getName()); }
@MarshalsPointer public static MPMediaEntityProperty toObject(Class<MPMediaEntityProperty> cls, long handle, long flags) { NSString o = (NSString) NSObject.Marshaler.toObject(NSString.class, handle, flags); if (o == null) { return null; } return MPMediaEntityProperty.valueOf(o); } @MarshalsPointer