getItemValueInteger (Document - Java)

Returns the value of an item with a single numeric value.

Defined in

Document

Syntax

public int getItemValueInteger(String name)
    throws NotesException

Parameters

String name

The name of the item.

Return value

int

The value of the item, rounded to the nearest integer.

Usage

If multiple items have the same name, this method returns the value of the first item.

If the item has no value or the value is text, date-time, or empty, this method returns 0.

If no item with the specified name exists, this method returns 0. It does not throw an exception. Use hasItem to verify the existence of an item.

If the item has multiple values, this method returns the first value.

A decimal number is rounded down if the fraction is less than 0.5 and up if the fraction is 0.5 or greater.

Example