@NotThreadSafe public class Prompt extends java.util.LinkedHashSet<Prompt.Type>
Related specifications:
Modifier and Type | Class and Description |
---|---|
static class |
Prompt.Type
Enumeration of the prompt types.
|
Constructor and Description |
---|
Prompt()
Creates a new empty prompt.
|
Prompt(Prompt.Type... type)
Creates a new prompt with the specified types.
|
Prompt(java.lang.String... values)
Creates a new prompt with the specified type values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isValid()
Checks if the prompt is valid.
|
static Prompt |
parse(java.util.Collection<java.lang.String> collection)
Parses a prompt from the specified string list.
|
static Prompt |
parse(java.lang.String s)
Parses a prompt from the specified string.
|
java.lang.String |
toString()
Returns the string representation of this prompt.
|
java.util.List<java.lang.String> |
toStringList()
Returns the string list representation of this prompt.
|
add, clear, clone, contains, isEmpty, iterator, remove, size
addAll, containsAll, retainAll, toArray, toArray
public Prompt()
public Prompt(Prompt.Type... type)
type
- The prompt types.public Prompt(java.lang.String... values)
values
- The prompt type values.java.lang.IllegalArgumentException
- If the type value is
invalid.public boolean isValid()
Prompt.Type.NONE
value.true
if this prompt if valid, else false
.public java.util.List<java.lang.String> toStringList()
public java.lang.String toString()
Example:
login consent
toString
in class java.util.AbstractCollection<Prompt.Type>
public static Prompt parse(java.util.Collection<java.lang.String> collection) throws ParseException
collection
- The string list to parse, with one or more
non-conflicting prompt types. May be null
.null
if the parsed string list was
null
or empty.ParseException
- If the string list couldn't be parsed to a
valid prompt.public static Prompt parse(java.lang.String s) throws ParseException
s
- The string to parse, with one or more non-conflicting space
delimited prompt types. May be null
.null
if the parsed string was
null
or empty.ParseException
- If the string couldn't be parsed to a valid
prompt.Copyright © 2016 Connect2id Ltd.. All Rights Reserved.