Package de.espirit.firstspirit.storage
Class Contrast
java.lang.Object
de.espirit.firstspirit.storage.Contrast
Container for contrast information, describing changes between elements
- Since:
- 4.0.51
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Describes the type of difference between elements -
Constructor Summary
ConstructorDescriptionContrast
(@NotNull Contrast.Type type) Creates a new instance with the specified type and no additional informationContrast
(@NotNull Contrast.Type type, @Nullable Object info) Creates a new instance with the specified type and optional additional information -
Method Summary
Modifier and TypeMethodDescriptionboolean
@Nullable Object
getInfo()
Get an info object associated with the change.@NotNull Contrast.Type
getType()
Get the type of change.boolean
Indicates this contrast to represent that the user had insufficient access rights for providing contrast information.int
hashCode()
static @NotNull Contrast
noAccess
(@NotNull Contrast.Type type) Creates a new instance indicating that there were insufficient permissions to retrieve the contrast information
-
Constructor Details
-
Contrast
Creates a new instance with the specified type and no additional information- Parameters:
type
- the type of the new contrast, must not benull
- Since:
- 4.0.51
-
Contrast
Creates a new instance with the specified type and optional additional information- Parameters:
type
- the type of the new contrast, must not benull
info
- the type of the new contrast, may benull
- Since:
- 4.0.51
-
-
Method Details
-
noAccess
Creates a new instance indicating that there were insufficient permissions to retrieve the contrast information- Parameters:
type
- the type of the new contrast, must not benull
- Returns:
- the new contrast, never
null
- Since:
- 4.0.51
-
hadNoAccess
public boolean hadNoAccess()Indicates this contrast to represent that the user had insufficient access rights for providing contrast information.- Returns:
true
, if the requesting user had no access to some data to be contrasted on.- Since:
- 4.0.51
-
getType
Get the type of change.- Returns:
- The change's type.
- Since:
- 4.0.51
-
getInfo
Get an info object associated with the change. The type of this object is specified by theContrast.Type
.- Returns:
- The associated info object.
- Since:
- 4.0.51
-
equals
-
hashCode
public int hashCode()
-