Class ObservedResult<E extends EntityType<E>>
- java.lang.Object
-
- com.kenshoo.pl.entity.spi.helpers.ObservedResult<E>
-
- All Implemented Interfaces:
FieldsValueMap<E>
public class ObservedResult<E extends EntityType<E>> extends java.lang.Object implements FieldsValueMap<E>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classObservedResult.Builder<E extends EntityType<E>>static classObservedResult.InspectedStatus
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> booleancontainsField(EntityField<E,T> field)Returnstrueis the map has a value for the given fieldstatic <E extends EntityType<E>>
ObservedResult<E>error(Identifier<E> identifier, java.lang.String errorCode)<T> Tget(EntityField<E,T> field)Returns the value of the specified field.java.util.Optional<java.lang.String>getErrorCode()Identifier<E>getIdentifier()ObservedResult.InspectedStatusgetInspectedStatus()booleanisSuccess()static <E extends EntityType<E>>
ObservedResult<E>of(Identifier<E> identifier, CurrentEntityState currentState)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.kenshoo.pl.entity.FieldsValueMap
safeGet
-
-
-
-
Method Detail
-
getInspectedStatus
public ObservedResult.InspectedStatus getInspectedStatus()
-
isSuccess
public boolean isSuccess()
-
getIdentifier
public Identifier<E> getIdentifier()
-
containsField
public <T> boolean containsField(EntityField<E,T> field)
Description copied from interface:FieldsValueMapReturnstrueis the map has a value for the given field- Specified by:
containsFieldin interfaceFieldsValueMap<E extends EntityType<E>>
-
get
public <T> T get(EntityField<E,T> field)
Description copied from interface:FieldsValueMapReturns the value of the specified field.- Specified by:
getin interfaceFieldsValueMap<E extends EntityType<E>>- Type Parameters:
T- type of the field- Parameters:
field- field to query- Returns:
- the value of the field. Can be
null.
-
getErrorCode
public java.util.Optional<java.lang.String> getErrorCode()
-
of
public static <E extends EntityType<E>> ObservedResult<E> of(Identifier<E> identifier, CurrentEntityState currentState)
-
error
public static <E extends EntityType<E>> ObservedResult<E> error(Identifier<E> identifier, java.lang.String errorCode)
-
-