Klasse ContainerMediator<E>
java.lang.Object
ch.nolix.core.errorcontrol.validator.ArgumentMediator<Iterable<E>>
ch.nolix.core.errorcontrol.validator.ContainerMediator<E>
- Typparameter:
E
- is the type of the elements of the argument of a container mediator.
- Bekannte direkte Unterklassen:
ExtendedContainerMediator
A named container mediator is an argument mediator for an iterable object
with a name. A named container mediator is not mutable.
- Version:
- 2017-08-15
- Autor:
- Silvan Wyss
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorBeschreibungContainerMediator
(Iterable<E> argument) Creates a new container mediator for the given argument. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
void
void
containsAll
(Iterable<Object> elements) void
containsAll
(Object[] elements) void
containsAsManyElementsAs
(Object[] array) void
containsExactly
(Object firstElement, Object... elements) void
containsExactlyEqualing
(Object[] elements) void
containsExactlyEqualing
(Object firstElement, Object... elements) void
containsExactlyInSameOrder
(E element, E... elements) void
containsOnce
(Object element) protected final String
void
hasElementCount
(int elementCount) void
hasSameSizeAs
(double[] array) void
isEmpty()
void
Von Klasse geerbte Methoden ch.nolix.core.errorcontrol.validator.ArgumentMediator
fulfills, getStoredArgument, hasSameStringRepresentationAs, hasStringRepresentation, is, isEqualTo, isNot, isNotEqualTo, isNotNull, isNull, isOfType
-
Felddetails
-
DEFAULT_ARGUMENT_NAME
- Siehe auch:
-
-
Konstruktordetails
-
ContainerMediator
Creates a new container mediator for the given argument.- Parameter:
argument
-
-
-
Methodendetails
-
contains
- Parameter:
element
-- Löst aus:
ArgumentDoesNotContainElementException
- if the argument of the currentContainerMediator
does not contain the given element.
-
contains
- Parameter:
condition
-- Löst aus:
ArgumentIsNullException
- if the given condition is null.ArgumentIsNullException
- if the argument of this container mediator is null.InvalidArgumentException
- if the argument of this container mediator does not contain an element that fulfills the given condition.
-
containsAll
-
containsAll
-
containsAsManyElementsAs
-
containsExactly
-
containsExactlyEqualing
-
containsExactlyEqualing
-
containsExactlyInSameOrder
-
containsOnce
- Parameter:
element
-- Löst aus:
InvalidArgumentException
- if the argument of the currentContainerMediator
does not contain the given element or contains the given element for several times.
-
hasElementCount
public void hasElementCount(int elementCount) - Parameter:
elementCount
-- Löst aus:
NegativeArgumentException
- if the given element count is negative.InvalidArgumentException
- if the argument of this container mediator contains less or more elements than the given element count says.
-
hasSameSizeAs
public void hasSameSizeAs(double[] array) - Parameter:
array
-- Löst aus:
ArgumentIsNullException
- if the given array is null.InvalidArgumentException
- if the argument of this container mediator contains less or more elements than the given array.
-
isEmpty
public void isEmpty()- Löst aus:
ArgumentIsNullException
- if the argument of this container mediator is null.NonEmptyArgumentException
- if the argument of this container mediator is empty.
-
isNotEmpty
public void isNotEmpty()- Löst aus:
ArgumentIsNullException
- if the argument of this container mediator is null.EmptyArgumentException
- if the argument of this container mediator is empty.
-
getArgumentName
- Gibt zurück:
- the argument name of the current
Mediator
.
-