/** converts a string or an any containing a string into a string. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no string is contained within object. @return the string contained within the object */ static public String toString(Object object) throws com.sun.star.lang.IllegalArgumentException { return (String) convertSimple( TypeClass.STRING, null, object); }
/** converts an array or an any containing an array into an array. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no array is contained within object. @return the array contained within the object */ static public Object toArray( Object object) throws com.sun.star.lang.IllegalArgumentException { return convertSimple( TypeClass.SEQUENCE, null, object); }
/** * Converts a string or an any containing a string into a string. * * @param object the object to convert. * @throws com.sun.star.lang.IllegalArgumentException in case no string is * contained within object. * * @return the string contained within the object. */ public static String toString(Object object) throws com.sun.star.lang.IllegalArgumentException { return (String) convertSimple( TypeClass.STRING, null, object); }
/** * Converts an array or an any containing an array into an array. * * @param object the object to convert. * @throws com.sun.star.lang.IllegalArgumentException in case no array is * contained within object. * * @return the array contained within the object. */ public static Object toArray( Object object) throws com.sun.star.lang.IllegalArgumentException { return convertSimple( TypeClass.SEQUENCE, null, object); }
/** * Converts a Type or an any containing a Type into a Type. * * @param object the object to convert. * @throws com.sun.star.lang.IllegalArgumentException in case no type is * contained within object. * * @return the type contained within the object. */ public static Type toType(Object object) throws com.sun.star.lang.IllegalArgumentException { return (Type) convertSimple( TypeClass.TYPE, null, object); }
/** converts a Type or an any containing a Type into a Type. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no type is contained within object. @return the type contained within the object */ static public Type toType(Object object) throws com.sun.star.lang.IllegalArgumentException { return (Type) convertSimple( TypeClass.TYPE, null, object); }
/** converts a number object into a simple int and allows widening conversions. Allowed argument types are Byte, Short, Integer or Any containing these types. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no short, byte or int is contained within object. @return the int contained within the object */ static public int toInt(Object object) throws com.sun.star.lang.IllegalArgumentException{ Integer ret= (Integer) convertSimple( TypeClass.LONG, null, object); return ret.intValue(); } /** converts a number object into an idl unsigned long and allows widening conversions.
/** converts a number object into a simple double and allows widening conversions. Allowed argument types are Byte, Short, Int, Float, Double or Any containing these types. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no byte, short, int, float or double is contained within object. @return the double contained within the object */ static public double toDouble(Object object) throws com.sun.star.lang.IllegalArgumentException { Double ret= (Double) convertSimple( TypeClass.DOUBLE, null, object); return ret.doubleValue(); }
/** converts a number object into a simple long and allows widening conversions. Allowed argument types are Byte, Short, Integer, Long or Any containing these types. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no short, byte, int or long is contained within object. @return the long contained within the object */ static public long toLong(Object object) throws com.sun.star.lang.IllegalArgumentException{ Long ret= (Long) convertSimple( TypeClass.HYPER, null, object); return ret.longValue(); } /** converts a number object into an idl unsigned hyper and allows widening conversions.
/** converts a number object into a simple float and allows widening conversions. Allowed argument types are Byte, Short, Float or Any containing these types. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no byte, short or float is contained within object. @return the float contained within the object */ static public float toFloat(Object object) throws com.sun.star.lang.IllegalArgumentException{ Float ret= (Float) convertSimple( TypeClass.FLOAT,null, object); return ret.floatValue(); }
/** converts an Boolean object or an Any object containing a Boolean object into a simple boolean. @param object the object to convert @return the boolean contained within the object @throws com.sun.star.lang.IllegalArgumentException in case no boolean is contained within object @see #isBoolean */ static public boolean toBoolean(Object object) throws com.sun.star.lang.IllegalArgumentException{ Boolean ret= (Boolean)convertSimple(TypeClass.BOOLEAN, null, object); return ret.booleanValue(); }
/** converts an Byte object or an Any object containing a Byte object into a simple byte. @param object the object to convert @return the boolean contained within the object @throws com.sun.star.lang.IllegalArgumentException in case no byte is contained within object @see #isBoolean */ static public byte toByte(Object object) throws com.sun.star.lang.IllegalArgumentException{ Byte ret= (Byte)convertSimple(TypeClass.BYTE, null, object); return ret.byteValue(); }
/** converts a number object into a simple short and allows widening conversions. Allowed argument types are Byte, Short or Any containing these types. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no short or byte is contained within object @return the short contained within the object */ static public short toShort(Object object) throws com.sun.star.lang.IllegalArgumentException{ Short ret= (Short)convertSimple(TypeClass.SHORT, null, object); return ret.shortValue(); } /** converts a number object into an idl unsigned short and allows widening conversions.
/** converts a number object into an idl unsigned short and allows widening conversions. Allowed argument types are Anies containing idl unsigned short values. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no idl unsigned short is contained within Any @return an (unsigned) short */ static public short toUnsignedShort(Object object) throws com.sun.star.lang.IllegalArgumentException { Short ret= (Short)convertSimple(TypeClass.UNSIGNED_SHORT, null, object); return ret.shortValue(); }
/** converts a number object into an idl unsigned long and allows widening conversions. Allowed argument types are Anies containing idl unsigned short or unsigned long values. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no idl unsigned short nor unsigned long is contained within Any @return an (unsigned) int */ static public int toUnsignedInt(Object object) throws com.sun.star.lang.IllegalArgumentException { Integer ret = (Integer)convertSimple(TypeClass.UNSIGNED_LONG, null, object); return ret.intValue(); }
/** converts an Char object or an Any object containing a Char object into a simple char. @param object the object to convert @return the char contained within the object @throws com.sun.star.lang.IllegalArgumentException in case no char is contained within object @see #isChar */ static public char toChar(Object object) throws com.sun.star.lang.IllegalArgumentException{ Character ret= (Character)convertSimple(TypeClass.CHAR, null, object); return ret.charValue(); }
/** * Converts a number object into a simple short and allows widening conversions. * * <p>Allowed argument types are Byte, Short or Any containing these types.</p> * * @param object the object to convert. * @throws com.sun.star.lang.IllegalArgumentException in case no short or * byte is contained within object. * * @return the short contained within the object. */ public static short toShort(Object object) throws com.sun.star.lang.IllegalArgumentException{ Short ret= (Short)convertSimple(TypeClass.SHORT, null, object); return ret.shortValue(); } /**
/** * Converts a number object into a simple double and allows widening conversions. * * <p>Allowed argument types are Byte, Short, Int, Float, Double or Any * containing these types.</p> * * @param object the object to convert. * @throws com.sun.star.lang.IllegalArgumentException in case no byte, short, * int, float or double is contained within object. * * @return the double contained within the object. */ public static double toDouble(Object object) throws com.sun.star.lang.IllegalArgumentException { Double ret= (Double) convertSimple( TypeClass.DOUBLE, null, object); return ret.doubleValue(); }
/** converts a number object into an idl unsigned hyper and allows widening conversions. Allowed argument types are Anies containing idl unsigned short, unsigned long or unsigned hyper values. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no idl unsigned short, nor unsigned long nor unsigned hyper is contained within object. @return an (unsigned) long */ static public long toUnsignedLong(Object object) throws com.sun.star.lang.IllegalArgumentException { Long ret = (Long)convertSimple(TypeClass.UNSIGNED_HYPER, null, object); return ret.longValue(); }
/** * Converts an Byte object or an Any object containing a Byte object into a * simple byte. * * @param object the object to convert. * @return the boolean contained within the object. * @throws com.sun.star.lang.IllegalArgumentException in case no byte is * contained within object. * * @see #isBoolean */ public static byte toByte(Object object) throws com.sun.star.lang.IllegalArgumentException{ Byte ret= (Byte)convertSimple(TypeClass.BYTE, null, object); return ret.byteValue(); }