Class PrimitiveValue

java.lang.Object
org.mpi_sws.jmc.runtime.scheduling.SchedulingChoiceValue
org.mpi_sws.jmc.runtime.scheduling.PrimitiveValue

public class PrimitiveValue extends SchedulingChoiceValue
Represents a primitive value that is returned by a strategy.

A concrete implementation of the SchedulingChoiceValue class

Primitive values are one of int, string or boolean.

  • Constructor Details

    • PrimitiveValue

      public PrimitiveValue(Object value)
  • Method Details

    • asInteger

      public int asInteger()
    • asString

      public String asString()
    • asBoolean

      public boolean asBoolean()
    • toJson

      public com.google.gson.JsonElement toJson()
      Description copied from class: SchedulingChoiceValue
      Converts this value to a JSON object.
      Specified by:
      toJson in class SchedulingChoiceValue
      Returns:
      the JSON representation of this value
    • type

      public String type()
      Description copied from class: SchedulingChoiceValue
      Returns the type of this value.

      Default types (int|string) have inbuilt adapters.

      This is used to identify the type of value in the JSON representation.

      Specified by:
      type in class SchedulingChoiceValue
      Returns:
      the type of this value