public class TypeCasting extends Object
| Constructor and Description |
|---|
TypeCasting() |
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
compare(SegmentConditions condition,
Comparable value1,
Comparable value2)
Run comparison with condition of primitive type.
|
static Boolean |
compare(SegmentConditions condition,
Object value1,
Object value2)
Compare the values value1 and value2 with the provided condition.
|
static Boolean |
isBoolean(Object str)
Is the object of type Boolean?.
|
static Boolean |
isDouble(Object number)
Is the object of type Double?.
|
static Boolean |
isFloat(Object number)
Is the object of type Float?.
|
static Boolean |
isInteger(Object number)
Is the object of type Integer?.
|
static Boolean |
isSemver(Object str)
Is the object of type Semver?.
|
static Boolean |
toBoolean(Object str)
Convert the object to Boolean.
|
static Double |
toDouble(Object number)
Convert the object to Double.
|
static Float |
toFloat(Object number)
Convert the object to float.
|
static Integer |
toInteger(Object number)
Convert to object to Integer.
|
static org.apache.maven.artifact.versioning.ComparableVersion |
toSemver(Object str)
Convert the object to Semver.
|
public static Boolean compare(SegmentConditions condition, Object value1, Object value2)
condition - SegmentCondition criteria to compare values against.value1 - Value to compare.value2 - Value to compare against.public static Boolean compare(SegmentConditions condition, Comparable value1, Comparable value2)
condition - SegmentCondition criteria to compare values against.value1 - Value to compare.value2 - Value to compare against.public static Double toDouble(Object number)
number - Object to convert to Double.public static Boolean isDouble(Object number)
number - Object to type check.public static Float toFloat(Object number)
number - Object to convert to Float.public static Boolean isFloat(Object number)
number - Object to type check.public static Integer toInteger(Object number)
number - Object to convert to Integer.public static Boolean isInteger(Object number)
number - Object to type check.public static Boolean toBoolean(Object str)
str - Object to convert to Boolean.public static Boolean isBoolean(Object str)
str - Object to type check.public static org.apache.maven.artifact.versioning.ComparableVersion toSemver(Object str)
str - Object to convert to Semver.Copyright © 2022. All rights reserved.