diff graal/com.oracle.truffle.api.interop/src/com/oracle/truffle/api/interop/InteropPredicate.java @ 18865:d6dba4c723c0

Interop: improve exception names and JavaDoc
author Matthias Grimmer <grimmer@ssw.jku.at>
date Wed, 14 Jan 2015 13:43:16 +0100
parents 5294b624e2f0
children
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.interop/src/com/oracle/truffle/api/interop/InteropPredicate.java	Tue Jan 13 19:48:15 2015 +0100
+++ b/graal/com.oracle.truffle.api.interop/src/com/oracle/truffle/api/interop/InteropPredicate.java	Wed Jan 14 13:43:16 2015 +0100
@@ -24,8 +24,17 @@
  */
 package com.oracle.truffle.api.interop;
 
-//TODO(mg): remove this interface and use java.util.function.Predicate once api.interop can use Java 8
-
+/**
+ * Represents a predicate of a {@code TruffleObject} argument.
+ */
 public interface InteropPredicate {
-    boolean test(Object object);
+
+    /**
+     * Evaluates the predicate on the given {@code TruffleObject}.
+     *
+     * @param object the input argument
+     * @return {@code true} if the {@code TruffleObject} argument matches the predicate, otherwise
+     *         {@code false}
+     */
+    boolean test(TruffleObject object);
 }