V - public final class SetVariant<V> extends Variant.CollectionVariant<Set<V>,V>
Variant.isPresent() or Variant.get()).isPropertyVariant.ClosureResultOrigin, Variant.ClosureVariant, Variant.CollectionVariant<T extends Collection<V>,V>, Variant.DereferenceOrigin, Variant.ListVariant<V>, Variant.MapVariant<K,V>, Variant.MethodResultOrigin, Variant.Origin, Variant.PropertyOrigin, Variant.RecordOrigin, Variant.RecordVariant, Variant.ReferenceOrigin, Variant.ScopedClosureVariantitemClasscontext, definitionType, NULL, origin| Constructor and Description |
|---|
SetVariant(Set<V> data,
Type valueType,
Variant.Origin origin,
Class<V> itemType,
LspsContextHolder context)
Creates the variant.
|
| Modifier and Type | Method and Description |
|---|---|
SetVariant<V> |
checkPresent()
Fails if the value is absent.
|
SetVariant<V> |
orEmptySet() |
SetVariant<V> |
orVariant(Set<V> defaultValue)
Returns this instance if it is present; a new variant with the defaultValue otherwise.
|
SetVariant<V> |
toNull()
Creates a new variant of same type and origin, but with null value.
|
SetVariant<V> |
toValue(Set<V> newValue)
Creates a new variant of same type and origin, but with given value.
|
Set<Variant<V>> |
toVariantSet()
Converts this list to a list of variants.
|
addAllTo, isNullOrEmpty, iterator, sizebool, cast, closure, collection, collectionOf, date, decimal, definitionOf, definitionOf, dereference, enumerationConstant, enumValueOf, enumValueOfIgnoreCase, equals, fail, fail, get, getHandle, getInstanceType, getOrigin, hasHandle, hashCode, instanceOf, integer, isAbsent, isClosure, isPath, isPresent, isProperty, isPropertyPath, isRecord, list, listHolder, listOf, map, mapHolder, mapOf, ofOrigin, ofUnknownOrigin, ofUnknownOrigin, or, param, path, property, propertyPath, record, reference, requireDefined, set, setHolder, setOf, setReferencedValue, setReferencedValueCollection, startTransaction, string, toString, toUpperCase, valueOrNull, wrapclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic SetVariant(Set<V> data, Type valueType, Variant.Origin origin, Class<V> itemType, LspsContextHolder context)
data - the value, may be null.valueType - The type of the value, either the record property type, or the closure result type. null: see Variant.requireDefined().origin - The value origin, such as "ui::Geolocation.latitude".itemType - - see super classcontext - - see super classpublic SetVariant<V> toNull()
toNull in class Variant.CollectionVariant<Set<V>,V>public SetVariant<V> toValue(Set<V> newValue)
toValue in class Variant.CollectionVariant<Set<V>,V>newValue - the new value, may be null.public SetVariant<V> checkPresent()
VariantcheckPresent in class Variant.CollectionVariant<Set<V>,V>public SetVariant<V> orVariant(Set<V> defaultValue)
VariantVariant.get() instead.
For a default value of null, use Variant.valueOrNull().orVariant in class Variant.CollectionVariant<Set<V>,V>defaultValue - the default value, may be null.public SetVariant<V> orEmptySet()
public Set<Variant<V>> toVariantSet()
IllegalStateException - if the list is null.Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.