Class ObjectOnly
java.lang.Object
org.soliscode.test.interfaces.ObjectOnly
The ObjectOnly
class wraps any object and only exposes the methods on the Object
interface. This is used for
testing a class or method implementation that operates on an Object
without any optimizations for the
instantiated class or any other implemented interfaces.
Objects of this class should be created using the Interfaces
utility class:
String s = "a string value";
Object obj = Interfaces.objectOnly(s);
- Since:
- 1.0
- Author:
- evanbergstrom
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ObjectOnly.ObjectOnly
(@NotNull Object obj) Creates anObjectOnly
object from any other object.ObjectOnly
(@NotNull ObjectOnly other) -
Method Summary
-
Constructor Details
-
ObjectOnly
public ObjectOnly()Creates an instance of ObjectOnly. The instance created will wrap the object Integer(0). -
ObjectOnly
-
ObjectOnly
Creates anObjectOnly
object from any other object.- Parameters:
obj
- the object whose interface is being restricted.
-
-
Method Details
-
hashCode
-
equals
-
toString
-