Android Open Source - Helpers Bundles






From Project

Back to project page Helpers.

License

The source code is released under:

MIT License

If you think the Android project Helpers listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package at.wrdlbrnft.helpers;
//from w  w w .j av a 2s.  c  o  m
import android.os.Bundle;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by Xaver on 22/07/14.
 */
public class Bundles {

    public static Bundle newBundle() {
        return new Bundle();
    }

    public static Bundle newBundle(Bundle bundle) {
        return new Bundle(bundle);
    }

    public static Bundle create(String key, String value) {
        Bundle bundle = new Bundle();
        bundle.putString(key, value);
        return bundle;
    }

    public static Bundle create(String key, String[] value) {
        Bundle bundle = new Bundle();
        bundle.putStringArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, boolean value) {
        Bundle bundle = new Bundle();
        bundle.putBoolean(key, value);
        return bundle;
    }

    public static Bundle create(String key, boolean[] value) {
        Bundle bundle = new Bundle();
        bundle.putBooleanArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, Bundle value) {
        Bundle bundle = new Bundle();
        bundle.putBundle(key, value);
        return bundle;
    }

    public static Bundle create(String key, byte value) {
        Bundle bundle = new Bundle();
        bundle.putByte(key, value);
        return bundle;
    }

    public static Bundle create(String key, byte[] value) {
        Bundle bundle = new Bundle();
        bundle.putByteArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, char value) {
        Bundle bundle = new Bundle();
        bundle.putChar(key, value);
        return bundle;
    }

    public static Bundle create(String key, char[] value) {
        Bundle bundle = new Bundle();
        bundle.putCharArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, CharSequence value) {
        Bundle bundle = new Bundle();
        bundle.putCharSequence(key, value);
        return bundle;
    }

    public static Bundle create(String key, CharSequence[] value) {
        Bundle bundle = new Bundle();
        bundle.putCharSequenceArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, double value) {
        Bundle bundle = new Bundle();
        bundle.putDouble(key, value);
        return bundle;
    }

    public static Bundle create(String key, double[] value) {
        Bundle bundle = new Bundle();
        bundle.putDoubleArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, float value) {
        Bundle bundle = new Bundle();
        bundle.putFloat(key, value);
        return bundle;
    }

    public static Bundle create(String key, float[] value) {
        Bundle bundle = new Bundle();
        bundle.putFloatArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, int value) {
        Bundle bundle = new Bundle();
        bundle.putInt(key, value);
        return bundle;
    }

    public static Bundle create(String key, int[] value) {
        Bundle bundle = new Bundle();
        bundle.putIntArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, long value) {
        Bundle bundle = new Bundle();
        bundle.putLong(key, value);
        return bundle;
    }

    public static Bundle create(String key, long[] value) {
        Bundle bundle = new Bundle();
        bundle.putLongArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, short value) {
        Bundle bundle = new Bundle();
        bundle.putShort(key, value);
        return bundle;
    }

    public static Bundle create(String key, short[] value) {
        Bundle bundle = new Bundle();
        bundle.putShortArray(key, value);
        return bundle;
    }

    public static Bundle create(String key, Serializable value) {
        Bundle bundle = new Bundle();
        bundle.putSerializable(key, value);
        return bundle;
    }

    public static Bundle create(String key, Parcelable value) {
        Bundle bundle = new Bundle();
        bundle.putParcelable(key, value);
        return bundle;
    }

    public static Bundle create(String key, Parcelable[] value) {
        Bundle bundle = new Bundle();
        bundle.putParcelableArray(key, value);
        return bundle;
    }
}




Java Source Code List

at.wrdlbrnft.helpers.ApplicationTest.java
at.wrdlbrnft.helpers.AssetHelper.java
at.wrdlbrnft.helpers.Base64Coder.java
at.wrdlbrnft.helpers.BitHelper.java
at.wrdlbrnft.helpers.BitmapHelper.java
at.wrdlbrnft.helpers.Bundles.java
at.wrdlbrnft.helpers.CanvasHelper.java
at.wrdlbrnft.helpers.Container.java
at.wrdlbrnft.helpers.Containers.java
at.wrdlbrnft.helpers.Dates.java
at.wrdlbrnft.helpers.ExtrasBuilder.java
at.wrdlbrnft.helpers.IntentHelper.java
at.wrdlbrnft.helpers.LayoutHelper.java
at.wrdlbrnft.helpers.LogHelper.java
at.wrdlbrnft.helpers.Maps.java
at.wrdlbrnft.helpers.NetworkHelper.java
at.wrdlbrnft.helpers.Numbers.java
at.wrdlbrnft.helpers.PackageHelper.java
at.wrdlbrnft.helpers.ReflectionHelper.java
at.wrdlbrnft.helpers.SerializationHelper.java
at.wrdlbrnft.helpers.Sets.java
at.wrdlbrnft.helpers.StreamHelper.java
at.wrdlbrnft.helpers.Strings.java
at.wrdlbrnft.helpers.TypeHelper.java
at.wrdlbrnft.helpers.ViewHelper.java
at.wrdlbrnft.helpers.credentials.CredentialsFactory.java
at.wrdlbrnft.helpers.credentials.Credentials.java
at.wrdlbrnft.helpers.lists.Difference.java
at.wrdlbrnft.helpers.lists.Lists.java
at.wrdlbrnft.helpers.lists.UniqueIdProvider.java
at.wrdlbrnft.helpers.lists.UpdateInfo.java
at.wrdlbrnft.helpers.lists.UpdateValueContainer.java
at.wrdlbrnft.helpers.time.Time.java
at.wrdlbrnft.helpers.time.Times.java