- All Superinterfaces:
IAnyAtomicItem,IAtomicValuedItem,ICollectionValue,IItem
An atomic Metapath item with a boolean value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IBooleanItemThe boolean item value offalse.static final IBooleanItemThe boolean item value oftrue. -
Method Summary
Modifier and TypeMethodDescriptionstatic IBooleanItemcast(IAnyAtomicItem item) Cast the provided type to this item type.default IBooleanItemcastAsType(IAnyAtomicItem item) Cast the provideditemto be the same type as this item.default intcompareTo(IBooleanItem item) Compares this value with the argument.default IAtomicOrUnionType<IBooleanItem>getType()Get the type information for the item.default IBooleanItemnegate()Get the boolean negation of this value.booleanGet the "wrapped" boolean value.static IAtomicOrUnionType<IBooleanItem>type()Get the type information for this item.static IBooleanItemvalueOf(boolean value) Construct a new boolean item using the providedvalue.static IBooleanItemConstruct a new boolean item using the provided stringvalue.Methods inherited from interface dev.metaschema.core.metapath.item.atomic.IAnyAtomicItem
accept, asMapKey, asString, asStringItem, atomize, deepEquals, getJavaTypeAdapter, getValue, toAtomicItemMethods inherited from interface dev.metaschema.core.metapath.item.ICollectionValue
deepEquals, toSignatureMethods inherited from interface dev.metaschema.core.metapath.item.IItem
contentsAsSequence, flatten, hasValue, toSequence
-
Field Details
-
TRUE
The boolean item value oftrue. -
FALSE
The boolean item value offalse.
-
-
Method Details
-
type
Get the type information for this item.- Returns:
- the type information
-
getType
Description copied from interface:IItemGet the type information for the item. -
valueOf
Construct a new boolean item using the provided stringvalue.The item will be
TRUEif the value is "1" or "true", orFALSEotherwise- Parameters:
value- a string representing a boolean value- Returns:
- the new item
- Throws:
InvalidTypeMetapathException- if the provided value is not a valid boolean value
-
valueOf
Construct a new boolean item using the providedvalue.- Parameters:
value- a boolean- Returns:
- the new item
-
cast
Cast the provided type to this item type.- Parameters:
item- the item to cast- Returns:
- the original item if it is already this type, otherwise a new item cast to this type
- Throws:
InvalidValueForCastFunctionException- if the provideditemcannot be cast to this type
-
castAsType
Description copied from interface:IAnyAtomicItemCast the provideditemto be the same type as this item.- Specified by:
castAsTypein interfaceIAnyAtomicItem- Parameters:
item- the item to cast- Returns:
- an atomic item of this type
-
toBoolean
boolean toBoolean()Get the "wrapped" boolean value.- Returns:
- the underlying boolean value
-
negate
Get the boolean negation of this value.- Returns:
- the negated boolean value
-
compareTo
Compares this value with the argument.- Parameters:
item- the item to compare with this value- Returns:
- a negative integer, zero, or a positive integer if this value is less
than, equal to, or greater than the
item.
-