001/*-
002 * #%L
003 * Smile CDR - CDR
004 * %%
005 * Copyright (C) 2016 - 2024 Smile CDR, Inc.
006 * %%
007 * All rights reserved.
008 * #L%
009 */
010package ca.cdr.api.util;
011
012import java.util.Set;
013
014public class ValueUtils {
015
016        private static final Set<Class<?>> TYPES = Set.of(
017                        Boolean.class,
018                        Character.class,
019                        Byte.class,
020                        Short.class,
021                        Integer.class,
022                        Long.class,
023                        Float.class,
024                        Double.class,
025                        Void.class,
026                        String.class);
027
028        public static boolean isPrimitiveOrString(Object theObj) {
029                return TYPES.contains(theObj.getClass());
030        }
031}