congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Variable.getValues
Code IndexAdd Tabnine to your IDE (free)

How to use
getValues
method
in
org.batfish.datamodel.questions.Variable

Best Java code snippets using org.batfish.datamodel.questions.Variable.getValues (Showing top 1 results out of 315)

origin: batfish/batfish

/**
 * This method calls {@link Client#validateType(JsonNode, Variable)} to check that the contents
 * encoded in {@code value} match the requirement specified in {@code variable}. Also, this method
 * validates the input {@code value} is allowed according to {@link Variable#_values values}
 * specified in {@code variable}.
 *
 * @throws BatfishException if the content type encoded in input {@code value} does not satisfy
 *     the type requirements specified in {@code variable}, or the input {@code value} is not an
 *     allowed value for {@code variable}.
 */
static void validateNode(JsonNode value, Variable variable, String parameterName)
  throws BatfishException {
 try {
  validateType(value, variable);
 } catch (BatfishException e) {
  String errorMessage =
    String.format("Invalid value for parameter %s: %s", parameterName, value);
  throw new BatfishException(errorMessage, e);
 }
 if (!variable.getValues().isEmpty()
   && variable.getValues().stream()
     .noneMatch(allowedValue -> allowedValue.getName().equals(value.asText()))) {
  throw new BatfishException(
    String.format(
      "Invalid value: %s, allowed values are: %s", value.asText(), variable.getValues()));
 }
}
org.batfish.datamodel.questionsVariablegetValues

Popular methods of Variable

  • setValue
  • <init>
  • getMinElements
  • getOptional
  • getType
  • getValue
  • setMinElements
  • setMinLength
  • setOptional
  • setType
  • setValues
  • getDescription
  • setValues,
  • getDescription,
  • getFields,
  • getMinLength,
  • setDescription,
  • setDisplayName,
  • setFields,
  • setLongDescription

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now