PCJ API
Version 1.2

bak.pcj.map
Class MapDefaults

java.lang.Object
  extended bybak.pcj.map.MapDefaults

public class MapDefaults
extends Object

This class implements methods for retrieving default values for each of the primitive types. The default values are returned by the maps' get()-methods when a specified key does not map to any value.

Note: Later versions may provide the ability to configure the default values returned by maps.

Since:
1.0

Constructor Summary
MapDefaults()
           
 
Method Summary
static boolean defaultBoolean()
          Returns a default boolean value (false).
static byte defaultByte()
          Returns a default byte value (0).
static char defaultChar()
          Returns a default char value ('\0').
static double defaultDouble()
          Returns a default double value (0.0).
static float defaultFloat()
          Returns a default float value (0.0f).
static int defaultInt()
          Returns a default int value (0).
static long defaultLong()
          Returns a default long value (0L).
static short defaultShort()
          Returns a default short value (0).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapDefaults

public MapDefaults()
Method Detail

defaultBoolean

public static boolean defaultBoolean()
Returns a default boolean value (false).

Returns:
a default boolean value (false).

defaultChar

public static char defaultChar()
Returns a default char value ('\0').

Returns:
a default char value ('\0').

defaultByte

public static byte defaultByte()
Returns a default byte value (0).

Returns:
a default byte value (0).

defaultShort

public static short defaultShort()
Returns a default short value (0).

Returns:
a default short value (0).

defaultInt

public static int defaultInt()
Returns a default int value (0).

Returns:
a default int value (0).

defaultLong

public static long defaultLong()
Returns a default long value (0L).

Returns:
a default long value (0L).

defaultFloat

public static float defaultFloat()
Returns a default float value (0.0f).

Returns:
a default float value (0.0f).

defaultDouble

public static double defaultDouble()
Returns a default double value (0.0).

Returns:
a default double value (0.0).

PCJ API
Version 1.2

Report a bug or request a feature.
Further information on the development and latest release of PCJ can be found at the project homepage.

Primitive Collections for Java is released under the GNU Lesser General Public License.
Copyright © 2002, 2003 Søren Bak. All Rights Reserved.

Hosted by SourceForge.net
SourceForge.net Logo