Package com.illumon.iris.db.plot.util
Class ArgumentValidations
java.lang.Object
com.illumon.iris.db.plot.util.ArgumentValidations
public class ArgumentValidations extends Object
Utilities for validating that plotting arguments are acceptable.
-
Constructor Summary
Constructors Constructor Description ArgumentValidations()
-
Method Summary
Modifier and Type Method Description static void
assertColumnsInTable(SelectableDataSet sds, PlotInfo plotInfo, String... cols)
Requires all columns incols
be columns in the selectable dataset.static void
assertColumnsInTable(TableHandle t, PlotInfo plotInfo, String... cols)
Requires all columns incols
be columns in the table held by the handle.static void
assertColumnsInTable(TableDefinition t, PlotInfo plotInfo, String... cols)
Requires all columns incols
be columns in the table.static void
assertColumnsInTable(Table t, PlotInfo plotInfo, String... cols)
Requires all columns incols
be columns in the table.static void
assertGreaterThan0(double d, String name, PlotInfo plotInfo)
Requires the input objecto
to be non-null.static void
assertInstance(SelectableDataSet sds, String column, Class c, String message, PlotInfo plotInfo)
static void
assertInstance(TableDefinition t, String column, Class c, String message, PlotInfo plotInfo)
static void
assertInstance(Table t, String column, Class c, String message, PlotInfo plotInfo)
static void
assertInstance(Class c1, Class c2, String message, PlotInfo plotInfo)
static void
assertIsBoxedNumeric(Table t, String column, PlotInfo plotInfo)
Requires the column's data type to be an instance ofNumber
as defined inTypeUtils.isBoxedNumeric(Class)
static void
assertIsBoxedNumeric(Table t, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be an instance ofNumber
as defined inTypeUtils.isBoxedNumeric(Class)
static void
assertIsNumeric(SelectableDataSet sds, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
static void
assertIsNumeric(TableDefinition t, String column, PlotInfo plotInfo)
Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
static void
assertIsNumeric(TableDefinition t, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
static void
assertIsNumeric(Table t, String column, PlotInfo plotInfo)
Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
static void
assertIsNumeric(Table t, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
static void
assertIsNumericOrTime(SelectableDataSet sds, String column, PlotInfo plotInfo)
Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
static void
assertIsNumericOrTime(SelectableDataSet sds, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
static void
assertIsNumericOrTime(TableDefinition t, String column, PlotInfo plotInfo)
Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
static void
assertIsNumericOrTime(TableDefinition t, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
static void
assertIsNumericOrTime(Table t, String column, PlotInfo plotInfo)
Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
static void
assertIsNumericOrTime(Table t, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
static void
assertIsNumericOrTimeOrCharOrComparableInstance(TableDefinition t, String column, PlotInfo plotInfo)
static void
assertIsNumericOrTimeOrCharOrComparableInstance(TableDefinition t, String column, String message, PlotInfo plotInfo)
static void
assertIsNumericOrTimeOrCharOrComparableInstance(Table t, String column, PlotInfo plotInfo)
static void
assertIsNumericOrTimeOrCharOrComparableInstance(Table t, String column, String message, PlotInfo plotInfo)
static void
assertIsPrimitiveNumeric(Table t, String column, PlotInfo plotInfo)
Requires the column's data type to be a numeric primitive as defined inTypeUtils.isPrimitiveNumeric(Class)
static void
assertIsPrimitiveNumeric(Table t, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be a numeric primitive as defined inTypeUtils.isPrimitiveNumeric(Class)
static void
assertIsTime(TableDefinition t, String column, PlotInfo plotInfo)
Requires the column's data type to be a time instance as defined inisTime(Class, PlotInfo)
static void
assertIsTime(TableDefinition t, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be a time instance as defined inisTime(Class, PlotInfo)
static void
assertIsTime(Table t, String column, PlotInfo plotInfo)
Requires the column's data type to be a time instance as defined inisTime(Class, PlotInfo)
static void
assertIsTime(Table t, String column, String message, PlotInfo plotInfo)
Requires the column's data type to be a time instance as defined inisTime(Class, PlotInfo)
static void
assertNotNull(Object o, String message, PlotInfo plotInfo)
Requires the input objecto
to be non-null.static <T> void
assertNotNullAndNotEmpty(T[] o, String message, PlotInfo plotInfo)
Requires the input objecto
to be non-null.static void
assertNull(Object o, String message, PlotInfo plotInfo)
static void
assertRangeNotInfinite(XYDataSeriesInternal series)
Assert that the X, Y and Z ranges of a dataseries do not contain infinite boundaries.static void
assertSameSize(IndexableNumericData[] data, String[] dataNames, PlotInfo plotInfo)
Requiresdata
anddataNames
1.static void
assertXValuesAreSame(AbstractXYDataSetCollection dataset)
static void
assertXValuesAreSame(String prefix, AbstractXYDataSetCollection dataset)
Requires allXYDataSeriesInternal
indataset
to have the same x-values.static void
assertXValuesAreSame(String prefix, XYDataSeriesInternal series0, XYDataSeriesInternal series)
Requires theseries
to have the same x-values as the firstXYDataSeriesInternal
in the collection.static Class
getColumnType(SelectableDataSet sds, String column, PlotInfo plotInfo)
Gets the data type of thecolumn
.static Class
getColumnType(TableDefinition t, String column, PlotInfo plotInfo)
Gets the data type of thecolumn
.static Class
getColumnType(Table t, String column, PlotInfo plotInfo)
Gets the data type of thecolumn
.static boolean
isBoxedNumeric(Table t, String column, PlotInfo plotInfo)
Whether the column's data typeTypeUtils.isBoxedNumeric(Class)
.static boolean
isNumeric(SelectableDataSet sds, String column, PlotInfo plotInfo)
Whether the column's data typeTypeUtils.isNumeric(Class)
.static boolean
isNumeric(TableDefinition t, String column, PlotInfo plotInfo)
Whether the column's data typeTypeUtils.isNumeric(Class)
.static boolean
isNumeric(Table t, String column, PlotInfo plotInfo)
Whether the column's data typeTypeUtils.isNumeric(Class)
.static boolean
isNumericOrTime(SelectableDataSet sds, String column, PlotInfo plotInfo)
Whether the column's data typeisNumericOrTime(Class, PlotInfo)
.static boolean
isNumericOrTime(TableDefinition t, String column, PlotInfo plotInfo)
Whether the column's data typeisNumericOrTime(Class, PlotInfo)
.static boolean
isNumericOrTime(Table t, String column, PlotInfo plotInfo)
Whether the column's data typeisNumericOrTime(Class, PlotInfo)
.static boolean
isNumericOrTime(Class c)
Whether the class isTypeUtils.isNumeric(Class)
orisTime(Class, PlotInfo)
static boolean
isNumericOrTime(Class c, PlotInfo plotInfo)
Whether the class isTypeUtils.isNumeric(Class)
orisTime(Class, PlotInfo)
static boolean
isPrimitiveNumeric(Table t, String column, PlotInfo plotInfo)
Whether the column's data typeTypeUtils.isPrimitiveNumeric(Class)
.static boolean
isTime(SelectableDataSet sds, String column, PlotInfo plotInfo)
Whether the column's data type equals Date.class or DBDateTime.classstatic boolean
isTime(TableDefinition t, String column, PlotInfo plotInfo)
Whether the column's data type equals Date.class or DBDateTime.classstatic boolean
isTime(Table t, String column, PlotInfo plotInfo)
Whether the column's data type equals Date.class or DBDateTime.classstatic boolean
isTime(Class c, PlotInfo plotInfo)
Whether the class is equal to Date.class or DBDateTime.classstatic boolean
nanSafeEquals(double x, double x1)
-
Constructor Details
-
ArgumentValidations
public ArgumentValidations()
-
-
Method Details
-
assertGreaterThan0
Requires the input objecto
to be non-null.- Parameters:
d
- valuename
- variable nameplotInfo
- source of the exception- Throws:
IllegalArgumentException
-o
is null
-
assertNotNull
Requires the input objecto
to be non-null.- Parameters:
o
- objectmessage
- error messageplotInfo
- source of the exception- Throws:
IllegalArgumentException
-o
is null
-
assertNotNullAndNotEmpty
Requires the input objecto
to be non-null.- Parameters:
o
- objectmessage
- error messageplotInfo
- source of the exception- Throws:
IllegalArgumentException
-o
is null
-
assertNull
-
assertInstance
- Parameters:
c1
- classc2
- classmessage
- error messageplotInfo
- source of the exception- Throws:
NullPointerException
-c1
andc2
must not be nullPlotRuntimeException
-c1
is not assignable toc2
IllegalArgumentException
-o
is null
-
assertInstance
public static void assertInstance(Table t, String column, Class c, String message, PlotInfo plotInfo)- Parameters:
t
- tablecolumn
- columnc
- classmessage
- error messageplotInfo
- source of the exception- Throws:
NullPointerException
-t
andc
must not be nullPlotRuntimeException
-column
is not a column oft
, orcolumn
does not have data typec
-
assertInstance
public static void assertInstance(TableDefinition t, String column, Class c, String message, PlotInfo plotInfo)- Parameters:
t
- tablecolumn
- columnc
- classmessage
- error messageplotInfo
- source of the exception- Throws:
NullPointerException
-t
andc
must not be nullPlotRuntimeException
-column
is not a column oft
, orcolumn
does not have data typec
-
assertInstance
public static void assertInstance(SelectableDataSet sds, String column, Class c, String message, PlotInfo plotInfo)- Parameters:
sds
- swappable data setcolumn
- columnc
- classmessage
- error messageplotInfo
- source of the exception- Throws:
NullPointerException
-sds
andc
must not be nullPlotRuntimeException
-column
is not a column oft
, orcolumn
does not have data typec
-
assertIsNumericOrTimeOrCharOrComparableInstance
public static void assertIsNumericOrTimeOrCharOrComparableInstance(Table t, String column, PlotInfo plotInfo)- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
NullPointerException
-t
must not be nullPlotRuntimeException
-column
is not a column oft
, orcolumn
does not have the correct data type
-
assertIsNumericOrTimeOrCharOrComparableInstance
public static void assertIsNumericOrTimeOrCharOrComparableInstance(TableDefinition t, String column, PlotInfo plotInfo)- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
NullPointerException
-t
must not be nullPlotRuntimeException
-column
is not a column oft
, orcolumn
does not have the correct data type
-
assertIsNumericOrTimeOrCharOrComparableInstance
public static void assertIsNumericOrTimeOrCharOrComparableInstance(Table t, String column, String message, PlotInfo plotInfo)- Parameters:
t
- tablecolumn
- columnmessage
- error messageplotInfo
- source of the exception- Throws:
NullPointerException
-t
must not be nullPlotRuntimeException
-column
is not a column oft
, orcolumn
does not have the correct data type
-
assertIsNumericOrTimeOrCharOrComparableInstance
public static void assertIsNumericOrTimeOrCharOrComparableInstance(TableDefinition t, String column, String message, PlotInfo plotInfo)- Parameters:
t
- tablecolumn
- columnmessage
- error messageplotInfo
- source of the exception- Throws:
NullPointerException
-t
must not be nullPlotRuntimeException
-column
is not a column oft
, orcolumn
does not have the correct data type
-
assertSameSize
public static void assertSameSize(IndexableNumericData[] data, String[] dataNames, PlotInfo plotInfo)Requiresdata
anddataNames
1. contain the same number of members. 2. contain no null members All members ofdata
must be the same size.- Parameters:
data
- array ofIndexableNumericData
dataNames
- names for eachIndexableNumericData
plotInfo
- source of the exception- Throws:
PlotIllegalStateException
-data
anddataNames
are not the same sizePlotIllegalArgumentException
- a member ofdata
ordataNames
is null 2+ members ofdata
are not the same size
-
getColumnType
Gets the data type of thecolumn
.- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- data type of
column
- Throws:
PlotRuntimeException
-column
not in the table
-
getColumnType
Gets the data type of thecolumn
.- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- data type of
column
- Throws:
PlotRuntimeException
-column
not in the table
-
getColumnType
Gets the data type of thecolumn
.- Parameters:
sds
- selectable datasetcolumn
- columnplotInfo
- source of the exception- Returns:
- data type of
column
- Throws:
PlotRuntimeException
-column
not in the table
-
isTime
Whether the class is equal to Date.class or DBDateTime.class- Parameters:
c
- classplotInfo
- source of the exception- Returns:
- true if
c
equals Date.class or DBDateTime.class, false otherwise
-
isNumericOrTime
Whether the class isTypeUtils.isNumeric(Class)
orisTime(Class, PlotInfo)
- Parameters:
c
- class- Returns:
- true if
c
is a numeric or time class, false otherwise
-
isNumericOrTime
Whether the class isTypeUtils.isNumeric(Class)
orisTime(Class, PlotInfo)
- Parameters:
c
- classplotInfo
- source of the exception- Returns:
- true if
c
is a numeric or time class, false otherwise
-
isTime
Whether the column's data type equals Date.class or DBDateTime.class- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type equals Date.class or DBDateTime.class, false otherwise
-
isTime
Whether the column's data type equals Date.class or DBDateTime.class- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type equals Date.class or DBDateTime.class, false otherwise
-
isTime
Whether the column's data type equals Date.class or DBDateTime.class- Parameters:
sds
- selectable datasetcolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type equals Date.class or DBDateTime.class, false otherwise
-
isPrimitiveNumeric
Whether the column's data typeTypeUtils.isPrimitiveNumeric(Class)
.- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type is a numeric primitive, false otherwise
-
isBoxedNumeric
Whether the column's data typeTypeUtils.isBoxedNumeric(Class)
.- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type is a boxed numeric, false otherwise
-
isNumeric
Whether the column's data typeTypeUtils.isNumeric(Class)
.- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type is numeric, false otherwise
-
isNumeric
Whether the column's data typeTypeUtils.isNumeric(Class)
.- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type is numeric, false otherwise
-
isNumeric
Whether the column's data typeTypeUtils.isNumeric(Class)
.- Parameters:
sds
- selectable datasetcolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type is numeric, false otherwise
-
isNumericOrTime
Whether the column's data typeisNumericOrTime(Class, PlotInfo)
.- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type is a numeric or time instance, false otherwise
-
isNumericOrTime
Whether the column's data typeisNumericOrTime(Class, PlotInfo)
.- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type is a numeric or time instance, false otherwise
-
isNumericOrTime
Whether the column's data typeisNumericOrTime(Class, PlotInfo)
.- Parameters:
sds
- selectable datasetcolumn
- columnplotInfo
- source of the exception- Returns:
- true if the column's data type is a numeric or time instance, false otherwise
-
assertIsTime
Requires the column's data type to be a time instance as defined inisTime(Class, PlotInfo)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
RuntimeException
- if the column's data type isn't a time instance
-
assertIsTime
Requires the column's data type to be a time instance as defined inisTime(Class, PlotInfo)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
RuntimeException
- if the column's data type isn't a time instance
-
assertIsTime
Requires the column's data type to be a time instance as defined inisTime(Class, PlotInfo)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exceptionmessage
- error message- Throws:
RuntimeException
- if the column's data type isn't a time instance
-
assertIsTime
public static void assertIsTime(TableDefinition t, String column, String message, PlotInfo plotInfo)Requires the column's data type to be a time instance as defined inisTime(Class, PlotInfo)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exceptionmessage
- error message- Throws:
RuntimeException
- if the column's data type isn't a time instance
-
assertIsPrimitiveNumeric
Requires the column's data type to be a numeric primitive as defined inTypeUtils.isPrimitiveNumeric(Class)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
RuntimeException
- if the column's data type isn't a numeric primitive
-
assertIsPrimitiveNumeric
public static void assertIsPrimitiveNumeric(Table t, String column, String message, PlotInfo plotInfo)Requires the column's data type to be a numeric primitive as defined inTypeUtils.isPrimitiveNumeric(Class)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exceptionmessage
- error message- Throws:
RuntimeException
- if the column's data type isn't a numeric primitive
-
assertIsBoxedNumeric
Requires the column's data type to be an instance ofNumber
as defined inTypeUtils.isBoxedNumeric(Class)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
RuntimeException
- if the column's data type isn't an instance ofNumber
-
assertIsBoxedNumeric
Requires the column's data type to be an instance ofNumber
as defined inTypeUtils.isBoxedNumeric(Class)
- Parameters:
t
- tablecolumn
- columnmessage
- error messageplotInfo
- source of the exception- Throws:
RuntimeException
- if the column's data type isn't an instance ofNumber
-
assertIsNumeric
Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric instance
-
assertIsNumeric
Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric instance
-
assertIsNumeric
Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
- Parameters:
t
- tablecolumn
- columnmessage
- error messageplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric instance
-
assertIsNumeric
public static void assertIsNumeric(TableDefinition t, String column, String message, PlotInfo plotInfo)Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
- Parameters:
t
- tablecolumn
- columnmessage
- error messageplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric instance
-
assertIsNumeric
public static void assertIsNumeric(SelectableDataSet sds, String column, String message, PlotInfo plotInfo)Requires the column's data type to be a numeric instance as defined inTypeUtils.isNumeric(Class)
- Parameters:
sds
- selectable datasetcolumn
- columnmessage
- error messageplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric instance
-
assertIsNumericOrTime
Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric or time instance
-
assertIsNumericOrTime
Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
- Parameters:
t
- tablecolumn
- columnplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric or time instance
-
assertIsNumericOrTime
Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
- Parameters:
sds
- selectable datasetcolumn
- columnplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric or time instance
-
assertIsNumericOrTime
public static void assertIsNumericOrTime(Table t, String column, String message, PlotInfo plotInfo)Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
- Parameters:
t
- tablecolumn
- columnmessage
- error messageplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric or time instance
-
assertIsNumericOrTime
public static void assertIsNumericOrTime(TableDefinition t, String column, String message, PlotInfo plotInfo)Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
- Parameters:
t
- tablecolumn
- columnmessage
- error messageplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric or time instance
-
assertIsNumericOrTime
public static void assertIsNumericOrTime(SelectableDataSet sds, String column, String message, PlotInfo plotInfo)Requires the column's data type to be a numeric or time instance as defined inisNumericOrTime(Class, PlotInfo)
- Parameters:
sds
- selectable datasetcolumn
- columnmessage
- error messageplotInfo
- source of the exception- Throws:
PlotRuntimeException
- if the column's data type isn't a numeric or time instance
-
assertColumnsInTable
Requires all columns incols
be columns in the table.- Parameters:
t
- tableplotInfo
- source of the exceptioncols
- column names- Throws:
IllegalArgumentException
- if the table does not contain all columns
-
assertColumnsInTable
Requires all columns incols
be columns in the table.- Parameters:
t
- tableplotInfo
- source of the exceptioncols
- column names- Throws:
IllegalArgumentException
- if the table does not contain all columns
-
assertColumnsInTable
Requires all columns incols
be columns in the selectable dataset.- Parameters:
sds
- selectable datasetplotInfo
- source of the exceptioncols
- column names- Throws:
IllegalArgumentException
- if the table does not contain all columns
-
assertColumnsInTable
Requires all columns incols
be columns in the table held by the handle.- Parameters:
t
- table handleplotInfo
- source of the exceptioncols
- column names- Throws:
IllegalArgumentException
- if the underlying table does not contain all columns
-
assertXValuesAreSame
-
assertXValuesAreSame
public static void assertXValuesAreSame(String prefix, AbstractXYDataSetCollection dataset) throws PlotIllegalStateExceptionRequires allXYDataSeriesInternal
indataset
to have the same x-values.- Parameters:
dataset
- data collection- Throws:
PlotIllegalStateException
- if not all series indataset
to have the same x-values.
-
assertXValuesAreSame
public static void assertXValuesAreSame(String prefix, XYDataSeriesInternal series0, XYDataSeriesInternal series) throws PlotIllegalStateExceptionRequires theseries
to have the same x-values as the firstXYDataSeriesInternal
in the collection.- Parameters:
series0
- first series in the collectionseries
- next series to check- Throws:
PlotIllegalStateException
- ifseries
does not have the same x-values as the firstXYDataSeriesInternal
in the collection.
-
nanSafeEquals
public static boolean nanSafeEquals(double x, double x1) -
assertRangeNotInfinite
public static void assertRangeNotInfinite(XYDataSeriesInternal series) throws PlotIllegalStateExceptionAssert that the X, Y and Z ranges of a dataseries do not contain infinite boundaries.- Parameters:
series
- The series to check- Throws:
PlotIllegalStateException
- if any of the ranges contain an infinite boundary
-