Startseite / Vorlagenentwicklung / Vorlagensyntax / Datentypen / Index

Datentyp IndexVerfügbar ab FirstSpirit-Version 5.2

Der Datentyp Index erweitert das Interface Collection<E>.

Die Elemente, die über den Iterator bezogen werden, sind vom Datentyp Record.

Objekt wird von folgenden Formular-Objekten erzeugt:
FS_INDEX
Methodenname Rückgabetyp Kurzbeschreibung Verfügbar seit
add(Object) boolean
addAll(Collection) boolean
clear void
contains(Object) boolean checks if the provided element is contained 4.0.0
containsAll(Collection) boolean checks if all elements of the provided element are contained 4.0.0
copy Collection make a (shallow) copy 4.0.0
create(String) Index$Record Create a record from the given identifier. 5.2.13
createSession(SpecialistsBroker) DataAccessSession Creates a session based on the definition and configuration of the underlying source. 5.2.191103
distinct(Lambda) Collection Ausgabe einer Liste eindeutiger Elemente 4.1
equals(Object) boolean
filter(String) Object delivers a filtered collection, the last parameter converted to a lambda expression 4.0.0
filter(Lambda) Object Filterung von Listenelementen 4.0.0
fold(Lambda, Map) Object Zusammenfassen von Werten 4.0.0
forEach(Consumer) void
getClass Class Klasse des aufrufenden Objektes
isCase(Object) boolean
isEmpty boolean Prüft, ob ein Ausdruck leer ist 4.0.0
isNull boolean Prüft, ob ein Ausdruck Null ist
iterator Iterator
length int
map(String) Object delivers a mapped collection, the last parameter converted to a lambda expression 4.0.0
map(Lambda) Object Ausgabe von Listenelementen als Sammlung 4.0.0
max Object delivers the maximum element (only applicable if elements are compareable) 4.0.0
max(Comparator) Object delivers the maximum element concerning to the given comparator 4.0.0
max(Lambda) Object Nach dem höchsten Wert filtern 4.0.0
min Object delivers the minimum element (only applicable if elements are compareable) 4.0.0
min(Comparator) Object delivers the minimum element concerning to the given comparator 4.0.0
min(Lambda) Object Nach dem niedrigsten Wert filtern 4.0.0
plus(Collection) Collection appends all elements to this collection (called for operator '+') 4.0.0
print void
print(Object) void
remove(Object) boolean
removeAll(Collection) boolean
removeIf(Predicate) boolean
retainAll(Collection) boolean
set(String, Object) Object
size int the number of contained elements 4.0.0
spliterator Spliterator
toArray Object[]
toArray(Object[]) Object[]
toArray(IntFunction) Object[]
toJSON String Convert to a JSON-compatible string representation including necessary quotes and escaping for immediate use. Handles Maps, Collections, Arrays, Numbers, Strings, Boolean, Date, and JsonElement. A date instance will be converted to an ISO-8601 formatted date string. Any object other than above will be converted using its 'toString()' value. 5.2.11
toList List Converts a collection to a list. 5.2.416
toString String
toString(String) String Ausgabe von durch Trennzeichen separierte Elemente als String 4.0.0
toString(String, String) String Short form for collection.map(attribute).toString(delimiter) 4.0.0
type String

add(Object)

Methodenname Rückgabetyp Verfügbar seit
add(Object) boolean

addAll(Collection)

Methodenname Rückgabetyp Verfügbar seit
addAll(Collection) boolean

clear

Methodenname Rückgabetyp Verfügbar seit
clear void

contains(Object)

checks if the provided element is contained
Methodenname Rückgabetyp Verfügbar seit
contains(Object) boolean 4.0.0

containsAll(Collection)

checks if all elements of the provided element are contained
Methodenname Rückgabetyp Verfügbar seit
containsAll(Collection) boolean 4.0.0

copy

make a (shallow) copy
Methodenname Rückgabetyp Verfügbar seit
copy Collection 4.0.0

create(String)

Create a record from the given identifier.
Methodenname Rückgabetyp Verfügbar seit
create(String) Index$Record 5.2.13

createSession(SpecialistsBroker)

Creates a session based on the definition and configuration of the underlying source.
Methodenname Rückgabetyp Verfügbar seit
createSession(SpecialistsBroker) DataAccessSession 5.2.191103

distinct(Lambda)

Über diese Methode können Duplikate einer Liste entsprechend einer Bedingung eliminiert bzw. ignoriert werden. Sie kann z. B. für Glossare oder Übersichten verwendet werden, die dann beispielsweise verlinkt auch als Navigationselement dienen können.

Siehe Seite Abbildungs-Ausdrücke (Lambda).

Methodenname Rückgabetyp Verfügbar seit
distinct(Lambda) Collection 4.1

equals(Object)

Methodenname Rückgabetyp Verfügbar seit
equals(Object) boolean

filter(String)

delivers a filtered collection, the last parameter converted to a lambda expression
Methodenname Rückgabetyp Verfügbar seit
filter(String) Object 4.0.0

filter(Lambda)

Haben Listen mehrere Attribute pro Element (vergleichbar einem Datensatz mit mehreren Spalten), können die Elemente mit der Methode .filter(Lambda) nach den einzelnen Attributen gefiltert werden.

Siehe dazu Seite Abbildungs-Ausdrücke (Lambda).

Methodenname Rückgabetyp Verfügbar seit
filter(Lambda) Object 4.0.0

fold(Lambda, Map)

Siehe Seite Abbildungs-Ausdrücke (Lambda).

Methodenname Rückgabetyp Verfügbar seit
fold(Lambda, Map) Object 4.0.0

forEach(Consumer)

Methodenname Rückgabetyp Verfügbar seit
forEach(Consumer) void

getClass

Die Methode .getClass() (in Bean-Syntax: .class) liefert die Klasse des aufrufendes Objektes zurück (vgl. java.lang.Class).

Aufruf:

$CMS_VALUE(myString.class)$
$CMS_VALUE(myString.getClass())$

Ausgabe:

java.lang.String
Methodenname Rückgabetyp Verfügbar seit
getClass Class

isCase(Object)

Methodenname Rückgabetyp Verfügbar seit
isCase(Object) boolean

isEmpty

Die Methode .isEmpty() (in Bean-Syntax: .isEmpty) prüft, ob ein Ausdruck bzw. Objekt leer ist, z. B. storeElement.isEmpty(). Das Ergebnis der semantischen Prüfung hängt vom Ausdruck bzw. Objekt ab, z. B. eine Zeichenkette ist dann leer, wenn sie kein Zeichen enthält. Bei Objekten mit komplexen Werten oder Objekten entscheidet das Objekt, wann es leer ist. Der Datentyp DomElement enthält beispielsweise immer ein leeres Dokument, ist also nie null. Die Prüfung einer leeren DOM-Editor-Eingabekomponente mit der Methode .isNull() liefert daher den Wert false, während die Prüfung der Komponente auf .isEmpty() den Wert true liefern würde.

Die Methode .isEmpty() gibt einen booleschen Wert als Ergebnis der Prüfung zurück. true (=wahr) ist die Prüfung, wenn der Ausdruck bzw. das Objekt leer ist und false (=unwahr) wenn nicht.

Methodenname Rückgabetyp Verfügbar seit
isEmpty boolean 4.0.0

isNull

Die Methode .isNull() (in Bean-Syntax: .isNull) prüft, ob ein Ausdruck bzw. Objekt Null ist, z. B. storeElement.isNull(). Bei Objekten mit komplexen Werten oder Objekten entscheidet das Objekt, wann es null ist. Der Datentyp DomElement enthält beispielsweise immer ein leeres Dokument, ist also nie null. Die Prüfung einer leeren DOM-Editor-Eingabekomponente mit der Methode .isNull() liefert daher den Wert false, während die Prüfung der Komponente auf .isEmpty() den Wert true liefern würde.

Die Methode .isNull() gibt einen booleschen Wert als Ergebnis der Prüfung zurück. true (=wahr) ist die Prüfung, wenn der Ausdruck bzw. das Objekt Null ist und false (=unwahr) wenn nicht.

Methodenname Rückgabetyp Verfügbar seit
isNull boolean

iterator

Methodenname Rückgabetyp Verfügbar seit
iterator Iterator

length

Methodenname Rückgabetyp Verfügbar seit
length int

map(String)

delivers a mapped collection, the last parameter converted to a lambda expression
Methodenname Rückgabetyp Verfügbar seit
map(String) Object 4.0.0

map(Lambda)

Siehe Seite Abbildungs-Ausdrücke (Lambda).

Methodenname Rückgabetyp Verfügbar seit
map(Lambda) Object 4.0.0

max

delivers the maximum element (only applicable if elements are compareable)
Methodenname Rückgabetyp Verfügbar seit
max Object 4.0.0

max(Comparator)

delivers the maximum element concerning to the given comparator
Methodenname Rückgabetyp Verfügbar seit
max(Comparator) Object 4.0.0

max(Lambda)

Siehe Seite Abbildungs-Ausdrücke (Lambda).

Methodenname Rückgabetyp Verfügbar seit
max(Lambda) Object 4.0.0

min

delivers the minimum element (only applicable if elements are compareable)
Methodenname Rückgabetyp Verfügbar seit
min Object 4.0.0

min(Comparator)

delivers the minimum element concerning to the given comparator
Methodenname Rückgabetyp Verfügbar seit
min(Comparator) Object 4.0.0

min(Lambda)

Siehe Seite Abbildungs-Ausdrücke (Lambda).

Methodenname Rückgabetyp Verfügbar seit
min(Lambda) Object 4.0.0

plus(Collection)

appends all elements to this collection (called for operator '+')
Methodenname Rückgabetyp Verfügbar seit
plus(Collection) Collection 4.0.0

print

Methodenname Rückgabetyp Verfügbar seit
print void

print(Object)

Methodenname Rückgabetyp Verfügbar seit
print(Object) void

remove(Object)

Methodenname Rückgabetyp Verfügbar seit
remove(Object) boolean

removeAll(Collection)

Methodenname Rückgabetyp Verfügbar seit
removeAll(Collection) boolean

removeIf(Predicate)

Methodenname Rückgabetyp Verfügbar seit
removeIf(Predicate) boolean

retainAll(Collection)

Methodenname Rückgabetyp Verfügbar seit
retainAll(Collection) boolean

set(String, Object)

Methodenname Rückgabetyp Verfügbar seit
set(String, Object) Object

size

the number of contained elements
Methodenname Rückgabetyp Verfügbar seit
size int 4.0.0

spliterator

Methodenname Rückgabetyp Verfügbar seit
spliterator Spliterator

toArray

Methodenname Rückgabetyp Verfügbar seit
toArray Object[]

toArray(Object[])

Methodenname Rückgabetyp Verfügbar seit
toArray(Object[]) Object[]

toArray(IntFunction)

Methodenname Rückgabetyp Verfügbar seit
toArray(IntFunction) Object[]

toJSON

Convert to a JSON-compatible string representation including necessary quotes and escaping for immediate use. Handles Maps, Collections, Arrays, Numbers, Strings, Boolean, Date, and JsonElement. A date instance will be converted to an ISO-8601 formatted date string. Any object other than above will be converted using its 'toString()' value.
Methodenname Rückgabetyp Verfügbar seit
toJSON String 5.2.11

toList

Converts a collection to a list.
Methodenname Rückgabetyp Verfügbar seit
toList List 5.2.416

toString

Methodenname Rückgabetyp Verfügbar seit
toString String

toString(String)

Unter der Angabe eines individuell wählbaren Trennzeichens können die einzelnen Elemente, z.B. einer Liste, zu einem String zusammengeführt werden, wobei das Trennzeichen zur Abtrennung der einzelnen Elemente verwendet wird.

Beispiel:

$CMS_SET(myList, ["Haus","Schlüssel","Fenster"])$
$CMS_VALUE(myList.toString("; "))$

Die Elemente der Liste myList werden mit Semikolon und Leerzeichen voneinander getrennt ausgegeben:

Haus; Schlüssel; Fenster
Methodenname Rückgabetyp Verfügbar seit
toString(String) String 4.0.0

toString(String, String)

Short form for collection.map(attribute).toString(delimiter)
Methodenname Rückgabetyp Verfügbar seit
toString(String, String) String 4.0.0

type

Methodenname Rückgabetyp Verfügbar seit
type String

© 2005 - 2024 Crownpeak Technology GmbH | Alle Rechte vorbehalten. | FirstSpirit 2024.4 | Datenschutz