Class ObjectUtil

java.lang.Object
org.palladiosimulator.indirections.util.ObjectUtil

public final class ObjectUtil extends Object
  • Method Details

    • tryCast

      public static <U, T extends U> Optional<T> tryCast(U in, Class<T> type)
    • forceCast

      public static <X extends Throwable, U, T extends U> T forceCast(U in, Class<T> type, Supplier<? extends X> exceptionSupplier) throws X
      Throws:
      X extends Throwable
    • forceCast

      public static <U, T extends U> T forceCast(U in, Class<T> type)