Java Code Examples for jdk.nashorn.api.scripting.ScriptObjectMirror#identical()
The following examples show how to use
jdk.nashorn.api.scripting.ScriptObjectMirror#identical() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScriptRuntime.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** ECMA 11.9.3 The Abstract Equality Comparison Algorithm */ private static boolean equals(final Object x, final Object y) { if (x == y) { return true; } if (x instanceof ScriptObject && y instanceof ScriptObject) { return false; // x != y } if (x instanceof ScriptObjectMirror || y instanceof ScriptObjectMirror) { return ScriptObjectMirror.identical(x, y); } return equalValues(x, y); }
Example 2
Source File: ScriptRuntime.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** ECMA 11.9.3 The Abstract Equality Comparison Algorithm */ private static boolean equals(final Object x, final Object y) { if (x == y) { return true; } if (x instanceof ScriptObject && y instanceof ScriptObject) { return false; // x != y } if (x instanceof ScriptObjectMirror || y instanceof ScriptObjectMirror) { return ScriptObjectMirror.identical(x, y); } return equalValues(x, y); }
Example 3
Source File: ScriptRuntime.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** ECMA 11.9.3 The Abstract Equality Comparison Algorithm */ private static boolean equals(final Object x, final Object y) { if (x == y) { return true; } if (x instanceof ScriptObject && y instanceof ScriptObject) { return false; // x != y } if (x instanceof ScriptObjectMirror || y instanceof ScriptObjectMirror) { return ScriptObjectMirror.identical(x, y); } return equalValues(x, y); }
Example 4
Source File: ScriptRuntime.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** ECMA 11.9.3 The Abstract Equality Comparison Algorithm */ private static boolean equals(final Object x, final Object y) { if (x == y) { return true; } if (x instanceof ScriptObject && y instanceof ScriptObject) { return false; // x != y } if (x instanceof ScriptObjectMirror || y instanceof ScriptObjectMirror) { return ScriptObjectMirror.identical(x, y); } return equalValues(x, y); }
Example 5
Source File: ScriptRuntime.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** ECMA 11.9.3 The Abstract Equality Comparison Algorithm */ private static boolean equals(final Object x, final Object y) { // We want to keep this method small so we skip reference equality check for numbers // as NaN should return false when compared to itself (JDK-8043608). if (x == y && !(x instanceof Number)) { return true; } if (x instanceof ScriptObject && y instanceof ScriptObject) { return false; // x != y } if (x instanceof ScriptObjectMirror || y instanceof ScriptObjectMirror) { return ScriptObjectMirror.identical(x, y); } return equalValues(x, y); }
Example 6
Source File: ScriptRuntime.java From hottub with GNU General Public License v2.0 | 5 votes |
/** ECMA 11.9.3 The Abstract Equality Comparison Algorithm */ private static boolean equals(final Object x, final Object y) { if (x == y) { return true; } if (x instanceof ScriptObject && y instanceof ScriptObject) { return false; // x != y } if (x instanceof ScriptObjectMirror || y instanceof ScriptObjectMirror) { return ScriptObjectMirror.identical(x, y); } return equalValues(x, y); }
Example 7
Source File: ScriptRuntime.java From jdk8u_nashorn with GNU General Public License v2.0 | 5 votes |
/** ECMA 11.9.3 The Abstract Equality Comparison Algorithm */ private static boolean equals(final Object x, final Object y) { if (x == y) { return true; } if (x instanceof ScriptObject && y instanceof ScriptObject) { return false; // x != y } if (x instanceof ScriptObjectMirror || y instanceof ScriptObjectMirror) { return ScriptObjectMirror.identical(x, y); } return equalValues(x, y); }