public final class BundleBuilder
extends java.lang.Object
Bundles.| Constructor and Description |
|---|
BundleBuilder()
Start a new bundle builder.
|
| Modifier and Type | Method and Description |
|---|---|
BundleBuilder |
addPrimary(BundleResource resource)
Add the primary resource to the bundle.
|
BundleBuilder |
addSecondary(BundleResource resource)
Add a (non-primary) resource to the bundle.
|
Bundle |
build()
Create a bundle from this builder's accumulated builder state, and reset the builder state.
|
public BundleBuilder addPrimary(BundleResource resource)
resource - the resource which will be the primary resource for the bundleBundleBuilderpublic BundleBuilder addSecondary(BundleResource resource)
resource - the resource to be addedBundleBuilderpublic Bundle build()
Bundlejava.lang.IllegalStateException - if no primary resouuce has been added