Package ch.nolix.core.net.messaging
Klasse IndexedPackage<C>
java.lang.Object
ch.nolix.core.net.messaging.IndexedPackage<C>
- Typparameter:
C- is the type of the content of aIndexedPackage.
A
IndexedPackage bundles an index and a content.- Version:
- 2016-06-01
- Autor:
- Silvan Wyss
-
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedIndexedPackage(int index, C content) Creates a newIndexedPackagewith the given index and content. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal intgetIndex()final Cfinal booleanhasIndex(int index) static <C2> IndexedPackage<C2> withIndexAndContent(int index, C2 content)
-
Konstruktordetails
-
IndexedPackage
Creates a newIndexedPackagewith the given index and content.- Parameter:
index-content-- Löst aus:
ArgumentIsNullException- if the given content is null.
-
-
Methodendetails
-
withIndexAndContent
- Typparameter:
C2- is the type of the given content.- Parameter:
index-content-- Gibt zurück:
- a new
IndexedPackagewith the given index and content. - Löst aus:
ArgumentIsNullException- if the given content is null.
-
getStoredContent
- Gibt zurück:
- the content of the current
IndexedPackage.
-
getIndex
public final int getIndex()- Gibt zurück:
- the index of the current
IndexedPackage.
-
hasIndex
public final boolean hasIndex(int index) - Parameter:
index-- Gibt zurück:
- true if the current
IndexedPackagehas the given index.
-