Package com.evolveum.midpoint.prism
Class PrismValueCollectionsUtil
- java.lang.Object
-
- com.evolveum.midpoint.prism.PrismValueCollectionsUtil
-
public class PrismValueCollectionsUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description PrismValueCollectionsUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull List<Referencable>
asReferencables(@NotNull Collection<PrismReferenceValue> values)
static @NotNull List<PrismReferenceValue>
asReferenceValues(@NotNull Collection<? extends Referencable> referencables)
static <T> void
clearParent(List<PrismPropertyValue<T>> values)
static <T extends PrismValue>
@NotNull Collection<T>cloneCollection(Collection<T> values)
static <T extends PrismValue>
@NotNull Collection<T>cloneCollectionComplex(CloneStrategy strategy, Collection<T> values)
static <X extends PrismValue>
Collection<X>cloneValues(Collection<X> values)
static <V extends PrismValue>
booleancollectionContainsEquivalentValue(Collection<V> collection, V value, ParameterizedEquivalenceStrategy equivalenceStrategy)
static <V extends PrismValue>
booleancontains(Collection<V> thisSet, V otherValue, EquivalenceStrategy strategy)
static <V extends PrismValue>
booleancontainsAll(Collection<V> thisSet, Collection<V> otherSet, EquivalenceStrategy strategy)
static boolean
containsOid(Collection<PrismReferenceValue> values, @NotNull String oid)
static boolean
containsRealValue(Collection<PrismPropertyValue<?>> collection, PrismPropertyValue<?> value)
static <V extends PrismValue>
booleancontainsRealValue(Collection<V> collection, V value)
static <X,V extends PrismValue>
booleancontainsRealValue(Collection<X> collection, V value, Function<X,V> valueExtractor)
static boolean
containsValue(Collection<PrismPropertyValue> collection, PrismPropertyValue value, Comparator comparator)
static <T> Collection<PrismPropertyValue<T>>
createCollection(PrismContext prismContext, Collection<T> realValueCollection)
static <T> Collection<PrismPropertyValue<T>>
createCollection(PrismContext prismContext, T[] realValueArray)
static <V extends PrismValue>
booleanequalsRealValues(Collection<V> collection1, Collection<V> collection2)
static <T> Set<T>
getRealValuesOfCollection(Collection<? extends PrismValue> collection)
static <T> Set<T>
getRealValuesOfCollectionPreservingNull(Collection<? extends PrismValue> collection)
static <T> Collection<T>
getValues(Collection<PrismPropertyValue<T>> pvals)
static <T extends PrismValue>
Collection<T>resetParentCollection(Collection<T> values)
Sets all parents to null.static <O extends Objectable,C extends Containerable>
Collection<PrismContainerValue<C>>toPrismContainerValues(Class<O> type, ItemPath path, PrismContext prismContext, C... containerValues)
static <X> Collection<PrismPropertyValue<X>>
toPrismPropertyValues(PrismContext prismContext, X... realValues)
static <T> Collection<PrismPropertyValue<T>>
wrap(PrismContext prismContext, @NotNull Collection<T> realValues)
static <T> PrismPropertyValue<T>[]
wrap(PrismContext prismContext, T... realValues)
-
-
-
Method Detail
-
getValues
public static <T> Collection<T> getValues(Collection<PrismPropertyValue<T>> pvals)
-
containsRealValue
public static boolean containsRealValue(Collection<PrismPropertyValue<?>> collection, PrismPropertyValue<?> value)
-
containsValue
public static boolean containsValue(Collection<PrismPropertyValue> collection, PrismPropertyValue value, Comparator comparator)
-
createCollection
public static <T> Collection<PrismPropertyValue<T>> createCollection(PrismContext prismContext, Collection<T> realValueCollection)
-
createCollection
public static <T> Collection<PrismPropertyValue<T>> createCollection(PrismContext prismContext, T[] realValueArray)
-
wrap
public static <T> Collection<PrismPropertyValue<T>> wrap(PrismContext prismContext, @NotNull @NotNull Collection<T> realValues)
-
wrap
@SafeVarargs public static <T> PrismPropertyValue<T>[] wrap(PrismContext prismContext, T... realValues)
-
asReferencables
@NotNull public static @NotNull List<Referencable> asReferencables(@NotNull @NotNull Collection<PrismReferenceValue> values)
-
asReferenceValues
@NotNull public static @NotNull List<PrismReferenceValue> asReferenceValues(@NotNull @NotNull Collection<? extends Referencable> referencables)
-
containsOid
public static boolean containsOid(Collection<PrismReferenceValue> values, @NotNull @NotNull String oid)
-
clearParent
public static <T> void clearParent(List<PrismPropertyValue<T>> values)
-
containsRealValue
public static <V extends PrismValue> boolean containsRealValue(Collection<V> collection, V value)
-
equalsRealValues
public static <V extends PrismValue> boolean equalsRealValues(Collection<V> collection1, Collection<V> collection2)
-
containsAll
public static <V extends PrismValue> boolean containsAll(Collection<V> thisSet, Collection<V> otherSet, EquivalenceStrategy strategy)
-
cloneCollection
@NotNull public static <T extends PrismValue> @NotNull Collection<T> cloneCollection(Collection<T> values)
-
resetParentCollection
public static <T extends PrismValue> Collection<T> resetParentCollection(Collection<T> values)
Sets all parents to null. This is good if the items are to be "transplanted" into a different Containerable.
-
getRealValuesOfCollectionPreservingNull
public static <T> Set<T> getRealValuesOfCollectionPreservingNull(Collection<? extends PrismValue> collection)
-
getRealValuesOfCollection
public static <T> Set<T> getRealValuesOfCollection(Collection<? extends PrismValue> collection)
-
containsRealValue
public static <X,V extends PrismValue> boolean containsRealValue(Collection<X> collection, V value, Function<X,V> valueExtractor)
-
contains
public static <V extends PrismValue> boolean contains(Collection<V> thisSet, V otherValue, EquivalenceStrategy strategy)
-
cloneValues
public static <X extends PrismValue> Collection<X> cloneValues(Collection<X> values)
-
cloneCollectionComplex
@NotNull public static <T extends PrismValue> @NotNull Collection<T> cloneCollectionComplex(CloneStrategy strategy, Collection<T> values)
-
collectionContainsEquivalentValue
public static <V extends PrismValue> boolean collectionContainsEquivalentValue(Collection<V> collection, V value, ParameterizedEquivalenceStrategy equivalenceStrategy)
-
toPrismPropertyValues
public static <X> Collection<PrismPropertyValue<X>> toPrismPropertyValues(PrismContext prismContext, X... realValues)
-
toPrismContainerValues
public static <O extends Objectable,C extends Containerable> Collection<PrismContainerValue<C>> toPrismContainerValues(Class<O> type, ItemPath path, PrismContext prismContext, C... containerValues) throws SchemaException
- Throws:
SchemaException
-
-