~duyi001/+junk/gephi

« back to all changes in this revision

Viewing changes to AttributesAPI/src/org/gephi/data/attributes/type/CharacterList.java

  • Committer: Mathieu Bastian
  • Date: 2010-05-27 19:50:47 UTC
  • mfrom: (1429.1.4 gephi)
  • Revision ID: mathieu.bastian@gmail.com-20100527195047-uj2jtqp3hdebxpgv
Merge with Martin's changes on Attributes. Finish implementation of new list attributes type, documentation and unit tests added. Simplify DataIndex and various improvements on the package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright 2008-2010 Gephi
 
3
Authors : Martin Škurla <bujacik@gmail.com>
 
4
Website : http://www.gephi.org
 
5
 
 
6
This file is part of Gephi.
 
7
 
 
8
Gephi is free software: you can redistribute it and/or modify
 
9
it under the terms of the GNU General Public License as published by
 
10
the Free Software Foundation, either version 3 of the License, or
 
11
(at your option) any later version.
 
12
 
 
13
Gephi is distributed in the hope that it will be useful,
 
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
GNU General Public License for more details.
 
17
 
 
18
You should have received a copy of the GNU General Public License
 
19
along with Gephi.  If not, see <http://www.gnu.org/licenses/>.
 
20
*/
 
21
package org.gephi.data.attributes.type;
 
22
 
 
23
/**
 
24
 * Complex type that define a list of Character items. Can be created from a char
 
25
 * array, from a Character array or from single string using either given or default separators.
 
26
 *
 
27
 * @author Martin Škurla
 
28
 */
 
29
public final class CharacterList extends AbstractList<Character> {
 
30
    
 
31
    public CharacterList(char[] primitiveCharArray) {
 
32
        super(TypeConvertor.<Character>convertPrimitiveToWrapperArray(primitiveCharArray));
 
33
    }
 
34
 
 
35
    public CharacterList(Character[] wrapperCharArray) {
 
36
        super(wrapperCharArray);
 
37
    }
 
38
 
 
39
    public CharacterList(String input) {
 
40
        this(input, AbstractList.DEFAULT_SEPARATOR);
 
41
    }
 
42
 
 
43
    public CharacterList(String input, String separator) {
 
44
        super(input, separator, Character.class);
 
45
    }
 
46
}