001package org.hl7.fhir.r4.fhirpath;
002
003import org.hl7.fhir.utilities.Utilities;
004
005public class FHIRPathConstant {
006
007  public static boolean isFHIRPathConstant(String string) {
008    return !Utilities.noString(string) && ((string.charAt(0) == '\'' || string.charAt(0) == '"')
009        || string.charAt(0) == '@' || string.charAt(0) == '%' || string.charAt(0) == '-' || string.charAt(0) == '+'
010        || (string.charAt(0) >= '0' && string.charAt(0) <= '9') || string.equals("true") || string.equals("false")
011        || string.equals("{}"));
012  }
013
014  public static boolean isFHIRPathFixedName(String string) {
015    return string != null && (string.charAt(0) == '`');
016  }
017
018  public static boolean isFHIRPathStringConstant(String string) {
019    return string.charAt(0) == '\'' || string.charAt(0) == '"' || string.charAt(0) == '`';
020  }
021}