LabelledMatrix1D { public LabelledMatrix1D<S, T> addIgnoringLabel(final LabelledMatrix1D<S, T> other) { return addIgnoringLabel(other, getDefaultTolerance()); } LabelledMatrix1D(final S[] keys, final double[] values, final T defaultTolerance);  LabelledMatrix1D(final S[] keys, final Object[] labels, final double[] values, final T defaultTolerance);  LabelledMatrix1D(final S[] keys, final String labelsTitle, final double[] values, final String valuesTitle, final T defaultTolerance);  LabelledMatrix1D(final S[] keys, final Object[] labels, final String labelsTitle, final double[] values, final String valuesTitle, final T defaultTolerance); S[] getKeys(); Object[] getLabels(); String getLabelsTitle(); double[] getValues(); String getValuesTitle(); int size(); LabelledMatrix1D<S, T> addIgnoringLabel(final LabelledMatrix1D<S, T> other); LabelledMatrix1D<S, T> addIgnoringLabel(final LabelledMatrix1D<S, T> other, final T tolerance); LabelledMatrix1D<S, T> add(final LabelledMatrix1D<S, T> other); LabelledMatrix1D<S, T> add(final LabelledMatrix1D<S, T> other, final T tolerance); LabelledMatrix1D<S, T> addIgnoringLabel(final S key, final Object label, final double value); LabelledMatrix1D<S, T> addIgnoringLabel(final S key, final Object label, final double value, final T tolerance); LabelledMatrix1D<S, T> add(final S key, final Object label, final double value); LabelledMatrix1D<S, T> add(final S key, final Object label, final double value, final T tolerance); T getDefaultTolerance(); abstract int compare(S key1, S key2, T tolerance); int compare(final S key1, final S key2); abstract LabelledMatrix1D<S, T> getMatrix(S[] keys, Object[] labels, String labelsTitle, double[] values, String valuesTitle); abstract LabelledMatrix1D<S, T> getMatrix(S[] keys, Object[] labels, double[] values); abstract LabelledMatrix1D<S, T> getMatrix(S[] keys, double[] values); @Override int hashCode(); @Override boolean equals(Object obj); LabelledMatrix1D<S, T> divideBy(double amountToDivideBy);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testAddWithNullKey() { M1.addIgnoringLabel(null, "N", 2); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testAddWithNullLabel() { M1.addIgnoringLabel(2., null, 2); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testAddNullMatrix1() { M1.addIgnoringLabel(null); }