FileDocCategorySizeDatePackage
ToDoImpl.javaAPI DocphoneME MR2 API (J2ME)3255Wed May 02 18:00:28 BST 2007com.sun.kvem.midp.pim

ToDoImpl

public class ToDoImpl extends AbstractPIMItem implements javax.microedition.pim.ToDo
Implementation of a PIM ToDo.

Fields Summary
Constructors Summary
public ToDoImpl(AbstractPIMList list)
Constructs a ToDo list.

param
list template list

        super(list, PIM.TODO_LIST);
        if (list != null && !(list instanceof ToDoListImpl)) {
            throw new RuntimeException("Wrong list passed");
        }
    
ToDoImpl(AbstractPIMList list, javax.microedition.pim.ToDo base)
Constructs a ToDo list.

param
list template list
param
base ToDo entry

        super(list, base);
        if (!(list instanceof ToDoListImpl)) {
            throw new RuntimeException("Wrong list passed");
        }
    
Methods Summary
PIMFormatgetEncodingFormat()
Gets the encoding format.

return
handle to format implementation

        return new VCalendar10Format();
    
protected intgetRevisionField()
Gets the revision field identifier.

return
revision field identifier

        return REVISION;
    
protected intgetUIDField()
Gets the UID field identifier.

return
UID field identifier

        return UID;
    
static booleanisValidPIMField(int field)
Checks if field is supported.

param
field identifier for field
return
true if field is supported

        switch (field) {
            case ToDo.CLASS:
            case ToDo.COMPLETED:
            case ToDo.COMPLETION_DATE:
            case ToDo.DUE:
            case ToDo.NOTE:
            case ToDo.PRIORITY:
            case ToDo.REVISION:
            case ToDo.SUMMARY:
            case ToDo.UID:
                return true;
            default:
                return false;
        }
    
protected java.lang.StringtoDisplayableString()
Converts the ToDo record to a printable format.

return
formatted ToDo record

        return "ToDo[" + formatData() + "]";