Class PseudoAny
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.vilTypes.PseudoAny
-
-
Constructor Summary
Constructors Modifier Constructor Description privatePseudoAny()Prevents external instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.BooleanconvertToBool(java.lang.Object ob)Converts object to boolean if possible.static java.lang.IntegerconvertToInt(java.lang.Object ob)Converts object to int if possible.static java.lang.DoubleconvertToReal(java.lang.Object ob)Converts object to real if possible.static booleanequals(java.lang.Object o1, java.lang.Object o2)Represents the equality operation for Objects.static java.lang.StringgetLocale(java.lang.Object ob)Returns the current (global) locale.static TypeDescriptor<?>getType(java.lang.Object ob)Returns the type ofob.static java.lang.StringsetLocale(java.lang.Object ob, java.lang.String locale)Changes the current (global) locale.static booleanunequals(java.lang.Object o1, java.lang.Object o2)Represents the unequality operation for Objects.
-
-
-
Method Detail
-
equals
public static boolean equals(java.lang.Object o1, java.lang.Object o2)Represents the equality operation for Objects.- Parameters:
o1- the object boolean to be consideredo2- the object boolean to be considered- Returns:
- o1 == o2
-
unequals
public static boolean unequals(java.lang.Object o1, java.lang.Object o2)Represents the unequality operation for Objects.- Parameters:
o1- the first object to be consideredo2- the second object to be considered- Returns:
- o1 != o2
-
convertToReal
public static java.lang.Double convertToReal(java.lang.Object ob)
Converts object to real if possible.- Parameters:
ob- the object- Returns:
- the real value or null
-
convertToInt
public static java.lang.Integer convertToInt(java.lang.Object ob)
Converts object to int if possible.- Parameters:
ob- the object- Returns:
- the int value or null
-
convertToBool
public static java.lang.Boolean convertToBool(java.lang.Object ob)
Converts object to boolean if possible.- Parameters:
ob- the object- Returns:
- the boolean value or null
-
getLocale
public static java.lang.String getLocale(java.lang.Object ob)
Returns the current (global) locale.- Parameters:
ob- the object to return the current locale for (ignored, needed to assign this to Any)- Returns:
- the current locale
-
setLocale
public static java.lang.String setLocale(java.lang.Object ob, java.lang.String locale)Changes the current (global) locale.- Parameters:
ob- the object to return the current locale for (ignored, needed to assign this to Any)locale- the new (global) locale- Returns:
- the (new) current locale
-
getType
public static TypeDescriptor<?> getType(java.lang.Object ob)
Returns the type ofob. This method is intended as fallback. In particular, basic types, collections and configuration types shall provide their own implementation. The parameter corresponds to the operand to derive the type for, i.e., non-static implementations rely on the implicit object.- Parameters:
ob- the object to return the type for- Returns:
- the type of object (may be
TypeRegistry.voidType())
-
-