Back to project page RoboBinding-gallery.
The source code is released under:
Apache License
If you think the Android project RoboBinding-gallery listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.robobinding.gallery.model.adapterview; /* w w w .ja v a2 s. c o m*/ import com.google.common.collect.Lists; import java.util.Collections; import java.util.List; /** * * @since 1.0 * @version $Revision: 1.0 $ * @author Cheng Wei */ public enum SampleStringType { SAMPLE1("Sample strings 1", SampleStrings.getSample1()), SAMPLE2("Sample strings 2", SampleStrings.getSample2()); private String name; private List<String> sample; private SampleStringType(String name, List<String> sample) { this.name = name; this.sample = sample; } @Override public String toString() { return name; } public List<String> getSample() { return sample; } private static List<SampleStringType> types = Lists.newArrayList(SampleStringType.values()); public static List<SampleStringType> types() { return Collections.unmodifiableList(types); } public static SampleStringType valueOf(int index) { return types.get(index); } }