lojix/state/src/main/com/thesett/aima/state/impl/JavaType.java
public T getDefaultInstance()
    {
        Object result;

        // For basic Java types return the standard default value. For others, try the default constructor.
        switch (type)
        {
        case BOOLEAN:
            result = DEFAULT_BOOLEAN;
            break;

        case CHARACTER:
            result = DEFAULT_CHARACTER;
            break;

        case BYTE:
            result = DEFAULT_BYTE;
            break;

        case SHORT:
            result = DEFAULT_SHORT;
            break;

        case INTEGER:
            result = DEFAULT_INTEGER;
            break;

        case LONG:
            result = DEFAULT_LONG;
            break;

        case FLOAT:
            result = DEFAULT_FLOAT;
            break;

        case DOUBLE:
            result = DEFAULT_DOUBLE;
            break;

        case OTHER:
        default:

            try
            {
                result = underlyingClass.newInstance();
            }
            catch (InstantiationException e)
            {
                throw new IllegalStateException(e);
            }
            catch (IllegalAccessException e)
            {
                throw new IllegalStateException(e);
            }

            break;
        }

        return (T) result;
    }
public T getDefaultInstance()
    {
        Object result;

        // For basic Java types return the standard default value. For others, try the default constructor.
        switch (type)
        {
        case BOOLEAN:
            result = DEFAULT_BOOLEAN;
            break;

        case CHARACTER:
            result = DEFAULT_CHARACTER;
            break;

        case BYTE:
            result = DEFAULT_BYTE;
            break;

        case SHORT:
            result = DEFAULT_SHORT;
            break;

        case INTEGER:
            result = DEFAULT_INTEGER;
            break;

        case LONG:
            result = DEFAULT_LONG;
            break;

        case FLOAT:
            result = DEFAULT_FLOAT;
            break;

        case DOUBLE:
            result = DEFAULT_DOUBLE;
            break;

        case OTHER:
        default:

            try
            {
                result = underlyingClass.newInstance();
            }
            catch (InstantiationException e)
            {
                throw new IllegalStateException(e);
            }
            catch (IllegalAccessException e)
            {
                throw new IllegalStateException(e);
            }

            break;
        }

        return (T) result;
    }
{@inheritDoc}