Package mpi

# Class Info

java.lang.Object
mpi.Info

All Implemented Interfaces:
  `Cloneable`, `Freeable`

public final class Info extends Object implements Freeable, Cloneable
This class represents `MPI_Info`.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected long`
`handle`
`protected static final long`
`NULL`

## Constructor Summary

Constructors
Modifier
Constructor
Description
``
`Info()`
Java binding of the MPI operation `MPI_INFO_CREATE`.
`protected`
`Info(long handle)`

## Method Summary

Modifier and Type
Method
Description
`Info`
`clone()`
Java binding of the MPI operation `MPI_INFO_DUP`.
`void`
`delete(String key)`
Java binding of the MPI operation `MPI_INFO_DELETE`.
`Info`
`dup()`
Java binding of the MPI operation `MPI_INFO_DUP`.
`void`
`free()`
Java binding of the MPI operation `MPI_INFO_FREE`.
`String`
`get(String key)`
Java binding of the MPI operation `MPI_INFO_GET`.
`String`
`getKey(int i)`
Java binding of the MPI operation `MPI_INFO_GET_NTHKEY`.
`boolean`
`isNull()`
Tests if the info object is `MPI_INFO_NULL` (has been freed).
`protected static Info`
`newEnv()`
`void`
`set(String key, String value)`
Java binding of the MPI operation `MPI_INFO_SET`.
`int`
`size()`
Java binding of the MPI operation `MPI_INFO_GET_NKEYS`.

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### handle

protected long handle

### NULL

protected static final long NULL

## Constructor Details

### Info

public Info() throws MPIException
Java binding of the MPI operation `MPI_INFO_CREATE`.

Throws:
  `MPIException` - Signals that an MPI error of some sort has occurred.

### Info

protected Info(long handle)

## Method Details

### newEnv

protected static Info newEnv()

### set

public void set(String key, String value) throws MPIException
Java binding of the MPI operation `MPI_INFO_SET`.

Parameters:
  `key` - key
  `value` - value
Throws:
  `MPIException` - Signals that an MPI error of some sort has occurred.

### get

public String get(String key) throws MPIException
Java binding of the MPI operation `MPI_INFO_GET`.

Parameters:
  `key` - key
Returns:
  value or `null` if key is not defined
Throws:
  `MPIException` - Signals that an MPI error of some sort has occurred.

### delete

public void delete(String key) throws MPIException
Java binding of the MPI operation `MPI_INFO_DELETE`.

Parameters:
  `key` - key
Throws:
  `MPIException` - Signals that an MPI error of some sort has occurred.

### size

public int size() throws MPIException
Java binding of the MPI operation `MPI_INFO_GET_NKEYS`.

Returns:
  number of defined keys
Throws:
  `MPIException` - Signals that an MPI error of some sort has occurred.

### getKey

public String getKey(int i) throws MPIException
Java binding of the MPI operation `MPI_INFO_GET_NTHKEY`.

Parameters:
  `i` - key number
Returns:
  key
Throws:
  `MPIException` - Signals that an MPI error of some sort has occurred.

### clone

public Info clone()
Java binding of the MPI operation `MPI_INFO_DUP`.

It is recommended to use `dup()` instead of `clone()` because the last can't throw an `MPIException`.

Overrides:
  `clone` in class `Object`
Returns:
  info object

### dup

public Info dup() throws MPIException
Java binding of the MPI operation `MPI_INFO_DUP`.

Returns:
  info object
Throws:
  `MPIException` - Signals that an MPI error of some sort has occurred.

### free

public void free() throws MPIException
Java binding of the MPI operation `MPI_INFO_FREE`.

Specified by:
  `free` in interface `Freeable`
Throws:
  `MPIException` - Signals that an MPI error of some sort has occurred.

### isNull

public boolean isNull()
Tests if the info object is `MPI_INFO_NULL` (has been freed).

Returns:
  true if the info object is `MPI_INFO_NULL`, false otherwise.