public class One<T extends Item> extends ZeroOrOne<T>
To extract the wrapped item, use ZeroOrOne.head()
.
Constructor and Description |
---|
One(T item)
Create an instance of the class
|
Modifier and Type | Method and Description |
---|---|
static One<BooleanValue> |
bool(boolean value)
Convenience function to create a singleton boolean value
|
static One<IntegerValue> |
integer(long value)
Convenience function to create a singleton integer value
|
static One<StringValue> |
string(java.lang.String value)
Convenience function to create a singleton string value
|
effectiveBooleanValue, empty, getLength, getStringValue, getStringValueCS, head, itemAt, iterate, reduce, subsequence, toString
public One(T item)
item
- The single item to be contained in the sequence. Must not be null.java.lang.NullPointerException
- if item is null.public static One<BooleanValue> bool(boolean value)
value
- the boolean valuepublic static One<StringValue> string(java.lang.String value)
value
- the string valuepublic static One<IntegerValue> integer(long value)
value
- the integer valueCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.