Class OpUtils
- java.lang.Object
-
- org.protelis.lang.interpreter.util.OpUtils
-
public final class OpUtils extends java.lang.Object
Utility class that OpN classes use for reporting certain failure patterns.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
unsupported(java.lang.String op, java.lang.Object... a)
This method builds a meaningful exception and throws it immediately.
-
-
-
Method Detail
-
unsupported
public static <T> T unsupported(java.lang.String op, java.lang.Object... a)
This method builds a meaningful exception and throws it immediately.- Type Parameters:
T
- Return type. This function never returns, this type is a placeholder that allows you to write stuff like "return unsupported(op, args)".- Parameters:
op
- The name of the operationa
- The arguments that have been passed, and that made the operation fail.- Returns:
- Nothing, since it throws an exception
- Throws:
java.lang.UnsupportedOperationException
- ALWAYS
-
-