/** * Converts an object to a Boolean. * * @param o The object to convert. * @return The converted object. */ public static Boolean toBoolean(Object o) { return toType(o, Boolean.class); }
/** * Converts an object to the specified type. * * @param o The object to convert. * @param type The type to covert to. * @param args The type arguments for types of map or collection. * @return The converted object. */ public static <T> T toType(Object o, Class<T> type, Type...args) { return ObjectUtils.toType(o, type, args); }
/** * Converts an object to the specified type. * * @param o The object to convert. * @param type The type to covert to. * @param args The type arguments for types of map or collection. * @return The converted object. */ public static <T> T toType(Object o, Class<T> type, Type...args) { return ObjectUtils.toType(o, type, args); }
/** * Converts an object to an Integer. * * @param o The object to convert. * @return The converted object. */ public static Integer toInteger(Object o) { return toType(o, Integer.class); }
/** * Converts an object to a Boolean. * * @param o The object to convert. * @return The converted object. */ public static Boolean toBoolean(Object o) { return toType(o, Boolean.class); }
/** * Converts an object to an Integer. * * @param o The object to convert. * @return The converted object. */ public static Integer toInteger(Object o) { return toType(o, Integer.class); }
/** * Converts an object to an Integer. * * @param o The object to convert. * @return The converted object. */ public static Integer toInteger(Object o) { return toType(o, Integer.class); }
/** * Converts an object to the specified type. * * @param o The object to convert. * @param type The type to covert to. * @param args The type arguments for types of map or collection. * @return The converted object. */ public static <T> T toType(Object o, Class<T> type, Type...args) { return ObjectUtils.toType(o, type, args); }
/** * Converts an object to a Boolean. * * @param o The object to convert. * @return The converted object. */ public static Boolean toBoolean(Object o) { return toType(o, Boolean.class); }
/** * Returns the attribute with the specified name converted to the specified class type. * * @param type * The class type to convert this class to. * See {@link ObjectUtils} for a list of supported conversion types. * @param key The attribute name. * @return The attribute value, or <jk>null</jk> if the named attribute does not exist. */ public <T> T getAttr(Class<T> type, String key) { return attrs == null ? null : ObjectUtils.toType(attrs.get(key), type); }
/** * Returns the attribute with the specified name converted to the specified class type. * * @param type * The class type to convert this class to. * See {@link ObjectUtils} for a list of supported conversion types. * @param key The attribute name. * @return The attribute value, or <jk>null</jk> if the named attribute does not exist. */ public <T> T getAttr(Class<T> type, String key) { return attrs == null ? null : ObjectUtils.toType(attrs.get(key), type); }
/** * Returns the attribute with the specified name converted to the specified class type. * * @param type * The class type to convert this class to. * See {@link ObjectUtils} for a list of supported conversion types. * @param key The attribute name. * @return The attribute value, or <jk>null</jk> if the named attribute does not exist. */ public <T> T getAttr(Class<T> type, String key) { return attrs == null ? null : ObjectUtils.toType(attrs.get(key), type); }
/** * Returns the child node at the specified index. * * @param type The class type of the node. * @param index The index of the node in the list of children. * @return The child node, or <jk>null</jk> if it doesn't exist. * @throws InvalidDataConversionException If node is not the expected type. */ public <T> T getChild(Class<T> type, int index) { return (children == null || children.size() <= index || index < 0 ? null : ObjectUtils.toType(children.get(index), type) ); }
/** * Returns the child node at the specified index. * * @param type The class type of the node. * @param index The index of the node in the list of children. * @return The child node, or <jk>null</jk> if it doesn't exist. * @throws InvalidDataConversionException If node is not the expected type. */ public <T> T getChild(Class<T> type, int index) { return (children == null || children.size() <= index || index < 0 ? null : ObjectUtils.toType(children.get(index), type) ); }
/** * Returns the child node at the specified index. * * @param type The class type of the node. * @param index The index of the node in the list of children. * @return The child node, or <jk>null</jk> if it doesn't exist. * @throws InvalidDataConversionException If node is not the expected type. */ public <T> T getChild(Class<T> type, int index) { return (children == null || children.size() <= index || index < 0 ? null : ObjectUtils.toType(children.get(index), type) ); }
/** * Returns the child node at the specified index. * * @param type The class type of the node. * @param index The index of the node in the list of children. * @return The child node, or <jk>null</jk> if it doesn't exist. * @throws InvalidDataConversionException If node is not the expected type. */ public <T> T getChild(Class<T> type, int index) { return ( children == null || children.size() <= index || index < 0 ? null : ObjectUtils.toType(children.get(index), type) ); }
/** * Returns the child node at the specified index. * * @param type The class type of the node. * @param index The index of the node in the list of children. * @return The child node, or <jk>null</jk> if it doesn't exist. * @throws InvalidDataConversionException If node is not the expected type. */ public <T> T getChild(Class<T> type, int index) { return ( children == null || children.size() <= index || index < 0 ? null : ObjectUtils.toType(children.get(index), type) ); }
/** * Returns the child node at the specified index. * * @param type The class type of the node. * @param index The index of the node in the list of children. * @return The child node, or <jk>null</jk> if it doesn't exist. * @throws InvalidDataConversionException If node is not the expected type. */ public <T> T getChild(Class<T> type, int index) { return ( children == null || children.size() <= index || index < 0 ? null : ObjectUtils.toType(children.get(index), type) ); }
for (String p : r.flags()) set(p, true); serializers(false, merge(ObjectUtils.toType(psb.peek(REST_serializers), Object[].class), r.serializers())); parsers(false, merge(ObjectUtils.toType(psb.peek(REST_parsers), Object[].class), r.parsers())); partSerializer(r.partSerializer()); partParser(r.partParser()); guards(reverse(r.guards())); children(r.children()); beanFilters(false, merge(ObjectUtils.toType(psb.peek(BEAN_beanFilters), Object[].class), r.beanFilters())); pojoSwaps(false, merge(ObjectUtils.toType(psb.peek(BEAN_pojoSwaps), Object[].class), r.pojoSwaps())); paramResolvers(r.paramResolvers()); serializerListener(r.serializerListener());
for (String p : r.flags()) set(p, true); serializers(false, merge(ObjectUtils.toType(psb.peek(REST_serializers), Object[].class), r.serializers())); parsers(false, merge(ObjectUtils.toType(psb.peek(REST_parsers), Object[].class), r.parsers())); partSerializer(r.partSerializer()); partParser(r.partParser()); guards(reverse(r.guards())); children(r.children()); beanFilters(false, merge(ObjectUtils.toType(psb.peek(BEAN_beanFilters), Object[].class), r.beanFilters())); pojoSwaps(false, merge(ObjectUtils.toType(psb.peek(BEAN_pojoSwaps), Object[].class), r.pojoSwaps())); paramResolvers(r.paramResolvers()); serializerListener(r.serializerListener());