FileDocCategorySizeDatePackage
ContactsElement.javaAPI DocAndroid 1.5 API1871Wed May 06 22:41:16 BST 2009com.google.wireless.gdata.contacts.data

ContactsElement

public abstract class ContactsElement extends Object
Contains attributes that are common to all elements in a ContactEntry.

Fields Summary
public static final byte
TYPE_NONE
private byte
type
private String
label
private boolean
isPrimary
Constructors Summary
Methods Summary
public java.lang.StringgetLabel()

    return label;
  
public bytegetType()

    return type;
  
public booleanisPrimary()


     
    return isPrimary;
  
public voidsetIsPrimary(boolean primary)

    isPrimary = primary;
  
public voidsetLabel(java.lang.String label)

    this.label = label;
  
public voidsetType(byte rel)

    this.type = rel;
  
public voidtoString(java.lang.StringBuffer sb)

    sb.append(" type:").append(type);
    sb.append(" isPrimary:").append(isPrimary);
    if (label != null) sb.append(" label:").append(label);
  
public java.lang.StringtoString()

    StringBuffer sb = new StringBuffer();
    toString(sb);
    return sb.toString();
  
public voidvalidate()

    if ((label == null && type == TYPE_NONE) || (label != null && type != TYPE_NONE)) {
      throw new ParseException("exactly one of label or type must be set");
    }