public class OptionGroupFactory extends Object
OptionGroups.| Modifier and Type | Class and Description |
|---|---|
class |
OptionGroupFactory.OptionGroup |
| Constructor and Description |
|---|
OptionGroupFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
countHits(Iterable<Option> options,
OptionOwner.HitCounter<String> counter)
Counts and sets the hits for the options based on their value.
|
void |
countHits(OptionOwner optionOwner,
OptionOwner.HitCounter<String> counter)
Counts and sets the hits for the owner's options based on their value.
|
<E extends Enum<E>> |
fromEnum(String id,
String titleId,
E[] allElements,
Collection<E> selectedElements)
Builds and returns a new
OptionOwner using the given Enum elements. |
<E extends Enum<E>> |
fromEnum(String id,
String titleId,
E[] allElements,
Collection<E> selectedElements,
NameProvider<E> nameProvider)
Builds and returns a new
OptionOwner using the given Enum elements. |
<E extends Enum<E>> |
fromEnum(String id,
String titleId,
E[] allElements,
E selectedElement)
Builds and returns a new
OptionOwner using the given Enum elements. |
<E extends Enum<E>> |
fromEnum(String id,
String titleId,
E[] allElements,
E selectedElement,
NameProvider<E> nameProvider)
Builds and returns a new
OptionOwner using the given Enum elements. |
<I extends Identifiable<?>> |
fromIdentifiable(String id,
String titleId,
Iterable<? extends I> allElements,
Collection<? extends I> selectedElements)
Builds and returns a new
OptionOwner using the given Identifiable elements. |
<I extends Identifiable<?>> |
fromIdentifiable(String id,
String titleId,
Iterable<? extends I> allElements,
Collection<? extends I> selectedElements,
NameProvider<I> nameProvider)
Builds and returns a new
OptionOwner using the given Identifiable elements. |
<I extends Identifiable<?>> |
fromIdentifiable(String id,
String titleId,
Iterable<? extends I> allElements,
I selectedElement)
Builds and returns a new
OptionOwner using the given Identifiable elements. |
<I extends Identifiable<?>> |
fromIdentifiable(String id,
String titleId,
Iterable<? extends I> allElements,
I selectedElement,
NameProvider<I> nameProvider)
Builds and returns a new
OptionOwner using the given Identifiable elements. |
<I extends Identifiable<?>> |
fromIdentifiable(String id,
String titleId,
Iterable<? extends I> allElements,
OptionOwner.Selector selector)
Builds and returns a new
OptionOwner using the given Identifiable elements. |
<I extends Identifiable<?>> |
fromIdentifiable(String id,
String titleId,
Iterable<? extends I> allElements,
OptionOwner.Selector selector,
NameProvider<I> nameProvider)
Builds and returns a new
OptionOwner using the given Identifiable elements. |
<N extends Named<?>> |
fromNamed(String id,
String titleId,
Iterable<? extends N> allElements,
Collection<? extends N> selectedElements)
Builds and returns a new
OptionOwner using the given Named elements. |
<N extends Named<?>> |
fromNamed(String id,
String titleId,
Iterable<? extends N> allElements,
Collection<? extends N> selectedElements,
NameProvider<N> nameProvider)
Builds and returns a new
OptionOwner using the given Named elements. |
<N extends Named<?>> |
fromNamed(String id,
String titleId,
Iterable<? extends N> allElements,
N selectedElement)
Builds and returns a new
OptionOwner using the given Named elements. |
<N extends Named<?>> |
fromNamed(String id,
String titleId,
Iterable<? extends N> allElements,
N selectedElement,
NameProvider<N> nameProvider)
Builds and returns a new
OptionOwner using the given Named elements. |
<N extends Named<?>> |
fromNamed(String id,
String titleId,
Iterable<? extends N> allElements,
OptionOwner.Selector selector)
Builds and returns a new
OptionOwner using the given Named elements. |
<N extends Named<?>> |
fromNamed(String id,
String titleId,
Iterable<? extends N> allElements,
OptionOwner.Selector selector,
NameProvider<N> nameProvider)
Builds and returns a new
OptionOwner using the given Named elements. |
<S> T |
fromObjects(String id,
String titleId,
S[] allElements,
NameProvider<S> nameProvider,
S... selectedElements)
Builds and returns a new
OptionOwner using the given Objects. |
<S> T |
fromObjects(String id,
String titleId,
S[] allElements,
OptionOwner.Selector selector)
Builds and returns a new
OptionOwner using the given Objects. |
<S> T |
fromObjects(String id,
String titleId,
S[] allElements,
OptionOwner.Selector selector,
NameProvider<S> nameProvider)
Builds and returns a new
OptionOwner using the given Objects. |
<S> T |
fromObjects(String id,
String titleId,
S[] allElements,
S... selectedElements)
Builds and returns a new
OptionOwner using the given Objects. |
protected OptionGroupFactory.OptionGroup |
getOwner(String id,
String title) |
protected OptionGroupFactory.OptionGroup getOwner(String id, String title)
public <N extends Named<?>> T fromNamed(String id, String titleId, Iterable<? extends N> allElements, Collection<? extends N> selectedElements, NameProvider<N> nameProvider)
OptionOwner using the given Named elements. For the Option's id,
Identifiable.getId() is used. If no NameProvider is given, Nameable.getName()() is used for the
Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElements - the selected elementsnameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public <N extends Named<?>> T fromNamed(String id, String titleId, Iterable<? extends N> allElements, N selectedElement, NameProvider<N> nameProvider)
OptionOwner using the given Named elements. For the Option's id,
Identifiable.getId() is used. If no NameProvider is given, Nameable.getName()() is used for the
Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElement - the selected elementnameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public <N extends Named<?>> T fromNamed(String id, String titleId, Iterable<? extends N> allElements, Collection<? extends N> selectedElements)
OptionOwner using the given Named elements. For the Option's id,
Identifiable.getId() is used. Nameable.getName()() is used for the Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElements - the selected elementsOptionOwner (actually a Selection or a
OptionGroup)public <N extends Named<?>> T fromNamed(String id, String titleId, Iterable<? extends N> allElements, N selectedElement)
OptionOwner using the given Named elements. For the Option's id,
Identifiable.getId() is used. Nameable.getName()() is used for the Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElement - the selected elementOptionOwner (actually a Selection or a
OptionGroup)public <N extends Named<?>> T fromNamed(String id, String titleId, Iterable<? extends N> allElements, OptionOwner.Selector selector)
OptionOwner using the given Named elements. For the Option's id,
Identifiable.getId() is used. Nameable.getName()() is used for the Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see Label.getId()).allElements - the elements to create Options fromselector - a OptionOwner.SelectorOptionOwner (actually a Selection or a
OptionGroup)public <N extends Named<?>> T fromNamed(String id, String titleId, Iterable<? extends N> allElements, OptionOwner.Selector selector, NameProvider<N> nameProvider)
OptionOwner using the given Named elements. For the Option's id,
Identifiable.getId() is used. If no NameProvider is given, Nameable.getName()() is used for the
Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see Label.getId()).allElements - the elements to create Options fromselector - a OptionOwner.SelectornameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public <I extends Identifiable<?>> T fromIdentifiable(String id, String titleId, Iterable<? extends I> allElements, Collection<? extends I> selectedElements)
OptionOwner using the given Identifiable elements. For the
Option's id, Identifiable.getId() is used, for the value Object.toString().id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElements - the selected elementsOptionOwner (actually a Selection or a
OptionGroup)public <I extends Identifiable<?>> T fromIdentifiable(String id, String titleId, Iterable<? extends I> allElements, I selectedElement)
OptionOwner using the given Identifiable elements. For the
Option's id, Identifiable.getId() is used, for the value Object.toString().id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElement - the selected elementOptionOwner (actually a Selection or a
OptionGroup)public <I extends Identifiable<?>> T fromIdentifiable(String id, String titleId, Iterable<? extends I> allElements, I selectedElement, NameProvider<I> nameProvider)
OptionOwner using the given Identifiable elements. For the
Option's id, Identifiable.getId() is used. If no NameProvider is given,
Object.toString() is used for the Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElement - the selected elementnameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public <I extends Identifiable<?>> T fromIdentifiable(String id, String titleId, Iterable<? extends I> allElements, Collection<? extends I> selectedElements, NameProvider<I> nameProvider)
OptionOwner using the given Identifiable elements. For the
Option's id, Identifiable.getId() is used. If no NameProvider is given,
Object.toString() is used for the Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElements - the selected elementsnameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public <I extends Identifiable<?>> T fromIdentifiable(String id, String titleId, Iterable<? extends I> allElements, OptionOwner.Selector selector)
OptionOwner using the given Identifiable elements. For the
Option's id, Identifiable.getId() is used, for the value Object.toString().id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see Label.getId()).allElements - the elements to create Options fromselector - a OptionOwner.SelectorOptionOwner (actually a Selection or a
OptionGroup)public <I extends Identifiable<?>> T fromIdentifiable(String id, String titleId, Iterable<? extends I> allElements, OptionOwner.Selector selector, NameProvider<I> nameProvider)
OptionOwner using the given Identifiable elements. For the
Option's id, Identifiable.getId() is used. If no NameProvider is given,
Object.toString() is used for the Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see Label.getId()).allElements - the elements to create Options fromselector - a OptionOwner.SelectornameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public <E extends Enum<E>> T fromEnum(String id, String titleId, E[] allElements, Collection<E> selectedElements)
OptionOwner using the given Enum elements. For both, the Option
's id and value, Enum.name() is used.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElements - the selected elementsOptionOwner (actually a Selection or a
OptionGroup)public <E extends Enum<E>> T fromEnum(String id, String titleId, E[] allElements, E selectedElement)
OptionOwner using the given Enum elements. For both, the Option
's id and value, Enum.name() is used.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElement - the selected elementOptionOwner (actually a Selection or a
OptionGroup)public <E extends Enum<E>> T fromEnum(String id, String titleId, E[] allElements, Collection<E> selectedElements, NameProvider<E> nameProvider)
OptionOwner using the given Enum elements. For the Option's id,
Enum.name() is used. If no NameProvider is given, Enum.name() is also used for the
Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElements - the selected elementsnameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public <E extends Enum<E>> T fromEnum(String id, String titleId, E[] allElements, E selectedElement, NameProvider<E> nameProvider)
OptionOwner using the given Enum elements. For the Option's id,
Enum.name() is used. If no NameProvider is given, Enum.name() is also used for the
Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElement - the selected elementnameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public <S> T fromObjects(String id, String titleId, S[] allElements, OptionOwner.Selector selector)
OptionOwner using the given Objects. For both, the Option's id
and value, Object.toString() is used.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see Label.getId()).allElements - the elements to create Options fromselector - a OptionOwner.SelectorOptionOwner (actually a Selection or a
OptionGroup)public <S> T fromObjects(String id, String titleId, S[] allElements, OptionOwner.Selector selector, NameProvider<S> nameProvider)
OptionOwner using the given Objects. For the Option's id,
Object.toString() is used. If no NameProvider is given, Object.toString() is also used
for the Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see Label.getId()).allElements - the elements to create Options fromselector - a OptionOwner.SelectornameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public <S> T fromObjects(String id, String titleId, S[] allElements, S... selectedElements)
OptionOwner using the given Objects. For both, the Option's id
and value, Object.toString() is used.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElements - the selected elementsOptionOwner (actually a Selection or a
OptionGroup)public <S> T fromObjects(String id, String titleId, S[] allElements, NameProvider<S> nameProvider, S... selectedElements)
OptionOwner using the given Objects. For the Option's id,
Object.toString() is used. If no NameProvider is given, Object.toString() is also used
for the Option's value.id - the id of the OptionOwnertitleId - the title-id of the OptionOwner (see
Label.getId()).allElements - the elements to create Options fromselectedElements - the selected elementsnameProvider - a NameProvider (optional)OptionOwner (actually a Selection or a
OptionGroup)public void countHits(Iterable<Option> options, OptionOwner.HitCounter<String> counter)
options - some optionscounter - a OptionOwner.HitCounterOption.getValue(),
Option.getHits()public void countHits(OptionOwner optionOwner, OptionOwner.HitCounter<String> counter)
optionOwner - an OptionOwnercounter - a OptionOwner.HitCounterOption.getValue(),
Option.getHits()Copyright © 2011–2022 aiticon GmbH. All rights reserved.