private PrimitiveObject getPrimitiveObject(int keyOrValue, String label, int type, String objectName) {
        PrimitiveObject o = null;
        if (keyOrValue == KEY) {
            o = key.getPrimitiveObject(label);
        } else {
            o = value.getPrimitiveObject(label);
        }

        if (o == null) {
            return null;
        }

        if (o.getType() != type) {
            throw new ClassCastException("object is not " + objectName + ": "+ label + "[" + o.getType() + "] = " + o.getObject());
        }

        return o;
    }
private PrimitiveObject getPrimitiveObject ( int keyOrValue , String label , int type , String objectName ) { PrimitiveObject o = null ; if ( keyOrValue == KEY ) { o = key . getPrimitiveObject ( label ) ; } else { o = value . getPrimitiveObject ( label ) ; } if ( o == null ) { return null ; } if ( o . getType ( ) != type ) { throw new ClassCastException ( "object is not " + objectName + ": " + label + "[" + o . getType ( ) + "] = " + o . getObject ( ) ) ; } return o ; }
@param keyOrValue
@param label
@param type
@param objectName
@return {@link PrimitiveObject}