Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
IndexedTestBean.java
Upload User: yntgsq
Upload Date: 2021-04-28
Package Size: 45995k
Code Size: 3k
Category:
Java Develop
Development Platform:
Java
- /*
- * Copyright 2002-2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- package org.springframework.beans;
- import java.util.ArrayList;
- import java.util.Collection;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import java.util.Set;
- import java.util.SortedMap;
- import java.util.SortedSet;
- import java.util.TreeSet;
- /**
- * @author Juergen Hoeller
- * @since 11.11.2003
- */
- public class IndexedTestBean {
- private TestBean[] array;
- private Collection collection;
- private List list;
- private Set set;
- private SortedSet sortedSet;
- private Map map;
- private SortedMap sortedMap;
- public IndexedTestBean() {
- this(true);
- }
- public IndexedTestBean(boolean populate) {
- if (populate) {
- populate();
- }
- }
- public void populate() {
- TestBean tb0 = new TestBean("name0", 0);
- TestBean tb1 = new TestBean("name1", 0);
- TestBean tb2 = new TestBean("name2", 0);
- TestBean tb3 = new TestBean("name3", 0);
- TestBean tb4 = new TestBean("name4", 0);
- TestBean tb5 = new TestBean("name5", 0);
- TestBean tb6 = new TestBean("name6", 0);
- TestBean tb7 = new TestBean("name7", 0);
- TestBean tbX = new TestBean("nameX", 0);
- TestBean tbY = new TestBean("nameY", 0);
- this.array = new TestBean[] {tb0, tb1};
- this.list = new ArrayList();
- this.list.add(tb2);
- this.list.add(tb3);
- this.set = new TreeSet();
- this.set.add(tb6);
- this.set.add(tb7);
- this.map = new HashMap();
- this.map.put("key1", tb4);
- this.map.put("key2", tb5);
- this.map.put("key.3", tb5);
- List list = new ArrayList();
- list.add(tbX);
- list.add(tbY);
- this.map.put("key4", list);
- }
- public TestBean[] getArray() {
- return array;
- }
- public void setArray(TestBean[] array) {
- this.array = array;
- }
- public Collection getCollection() {
- return collection;
- }
- public void setCollection(Collection collection) {
- this.collection = collection;
- }
- public List getList() {
- return list;
- }
- public void setList(List list) {
- this.list = list;
- }
- public Set getSet() {
- return set;
- }
- public void setSet(Set set) {
- this.set = set;
- }
- public SortedSet getSortedSet() {
- return sortedSet;
- }
- public void setSortedSet(SortedSet sortedSet) {
- this.sortedSet = sortedSet;
- }
- public Map getMap() {
- return map;
- }
- public void setMap(Map map) {
- this.map = map;
- }
- public SortedMap getSortedMap() {
- return sortedMap;
- }
- public void setSortedMap(SortedMap sortedMap) {
- this.sortedMap = sortedMap;
- }
- }