|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.appengine.api.search.Field.Builder
public static final class Field.Builder
A field builder. Fields must have a name, and optionally a locale and at most one of text, html, atom or date.
Method Summary | |
---|---|
Field |
build()
Builds a field using this builder. |
Field.Builder |
setAtom(java.lang.String atom)
Sets an atomic value, indivisible text, for the field. |
Field.Builder |
setDate(java.util.Date date)
Sets a date associated with the field. |
Field.Builder |
setHTML(java.lang.String html)
Sets a HTML value for the field. |
Field.Builder |
setLocale(java.util.Locale locale)
Sets the Locale of the field value. |
Field.Builder |
setName(java.lang.String name)
Sets a name for the field. |
Field.Builder |
setNumber(double number)
Sets a numeric value for the field. |
Field.Builder |
setText(java.lang.String text)
Sets a text value for the field. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Field.Builder setName(java.lang.String name)
FieldChecker.FIELD_NAME_PATTERN
.
name
- the name of the field
java.lang.IllegalArgumentException
- if the name or value is invalidpublic Field.Builder setText(java.lang.String text)
text
- the text value of the field
java.lang.IllegalArgumentException
- if the text is invalidpublic Field.Builder setHTML(java.lang.String html)
html
- the HTML value of the field
java.lang.IllegalArgumentException
- if the HTML is invalidpublic Field.Builder setAtom(java.lang.String atom)
atom
- the indivisible text of the field
java.lang.IllegalArgumentException
- if the atom is invalidpublic Field.Builder setDate(java.util.Date date)
date
- the date of the field
java.lang.IllegalArgumentException
- if the date has a time componentpublic Field.Builder setNumber(double number)
number
must be
between FieldChecker.MIN_NUMBER_VALUE
and
FieldChecker.MAX_NUMBER_VALUE
.
number
- the numeric value of the field
java.lang.IllegalArgumentException
- if the number is outside the valid rangepublic Field.Builder setLocale(java.util.Locale locale)
locale
- the locale the field value is written in
public Field build()
Field
built by this builder
java.lang.IllegalArgumentException
- if the field has an invalid
name, text, HTML, atom, date
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |