public String getErrorDomain() {
   if (has(Keys.ErrorDomain())) {
     NSString val = (NSString) get(Keys.ErrorDomain());
     return val.toString();
   }
   return null;
 }
 /** @since Available in iOS 4.0 and later. */
 public String getAirline() {
   if (data.containsKey(AirlineKey())) {
     NSString val = (NSString) data.get(AirlineKey());
     return val.toString();
   }
   return null;
 }
 /** @since Available in iOS 7.0 and later. */
 public String getRestoreIdentifier() {
   if (has(Keys.RestoreIdentifier())) {
     NSString val = (NSString) get(Keys.RestoreIdentifier());
     return val.toString();
   }
   return null;
 }
 /** @since Available in iOS 4.0 and later. */
 public String getFlight() {
   if (data.containsKey(FlightKey())) {
     NSString val = (NSString) data.get(FlightKey());
     return val.toString();
   }
   return null;
 }
示例#5
0
  public static /*<name>*/ CMVideoCodecType /*</name>*/ valueOf(NSString n) {
    byte[] by = n.toString().getBytes();
    long value = 0;
    for (int i = 0; i < by.length; i++) {
      value = (value << 8) + (by[i] & 0xff);
    }

    for (/*<name>*/ CMVideoCodecType /*</name>*/ v : values()) {
      if (v.n == value) {
        return v;
      }
    }
    throw new IllegalArgumentException(
        "No constant with value "
            + n
            + " found in "
            + /*<name>*/ CMVideoCodecType /*</name>*/.class.getName());
  }