OSDN Git Service

use diamond operator.
authorOlyutorskii <olyutorskii@users.osdn.me>
Wed, 12 Jun 2019 06:54:14 +0000 (15:54 +0900)
committerOlyutorskii <olyutorskii@users.osdn.me>
Wed, 12 Jun 2019 06:54:14 +0000 (15:54 +0900)
src/main/java/jp/sfjp/mikutoga/corelib/I18nText.java
src/main/java/jp/sfjp/mikutoga/typical/AliasMap.java
src/main/java/jp/sfjp/mikutoga/typical/I18nAlias.java
src/main/java/jp/sfjp/mikutoga/typical/TypicalBone.java
src/main/java/jp/sfjp/mikutoga/typical/TypicalMorph.java
src/main/java/jp/sfjp/mikutoga/xml/DomUtils.java
src/main/java/jp/sfjp/mikutoga/xml/SchemaUtil.java
src/main/java/jp/sfjp/mikutoga/xml/XmlResourceResolver.java

index 3ca7dc5..930a858 100644 (file)
@@ -48,8 +48,7 @@ public class I18nText implements CharSequence {
     /**
      * キーはISO639、値は多言語テキスト。
      */
     /**
      * キーはISO639、値は多言語テキスト。
      */
-    private final Map<String, String> nameMap =
-            new HashMap<String, String>();
+    private final Map<String, String> nameMap = new HashMap<>();
 
 
     /**
 
 
     /**
@@ -238,7 +237,7 @@ public class I18nText implements CharSequence {
      */
     public List<String> lang639CodeList(){
         Set<String> set = this.nameMap.keySet();
      */
     public List<String> lang639CodeList(){
         Set<String> set = this.nameMap.keySet();
-        List<String> result = new ArrayList<String>(set.size());
+        List<String> result = new ArrayList<>(set.size());
 
         for(String lang : set){
             if(lang.equals(CODE639_PRIMARY)) result.add(lang);
 
         for(String lang : set){
             if(lang.equals(CODE639_PRIMARY)) result.add(lang);
index 9e1dfa9..a59c749 100644 (file)
@@ -32,8 +32,8 @@ class AliasMap<T extends I18nAlias> {
     AliasMap(){
         super();
 
     AliasMap(){
         super();
 
-        this.primaryAliasMap = new HashMap<String, T>();
-        this.globalAliasMap  = new HashMap<String, T>();
+        this.primaryAliasMap = new HashMap<>();
+        this.globalAliasMap  = new HashMap<>();
 
         return;
     }
 
         return;
     }
index f6b558d..4c4de31 100644 (file)
@@ -66,15 +66,15 @@ class I18nAlias {
         super();
 
         if(primaryNum <= 0){
         super();
 
         if(primaryNum <= 0){
-            this.primaryNameList = new LinkedList<String>();
+            this.primaryNameList = new LinkedList<>();
         }else{
         }else{
-            this.primaryNameList = new ArrayList<String>(primaryNum);
+            this.primaryNameList = new ArrayList<>(primaryNum);
         }
 
         if(globalNum <= 0){
         }
 
         if(globalNum <= 0){
-            this.globalNameList  = new LinkedList<String>();
+            this.globalNameList  = new LinkedList<>();
         }else{
         }else{
-            this.globalNameList  = new ArrayList<String>(globalNum);
+            this.globalNameList  = new ArrayList<>(globalNum);
         }
 
         this.umodPrimaryNameList =
         }
 
         this.umodPrimaryNameList =
index 46e433c..371d7ea 100644 (file)
@@ -39,9 +39,9 @@ public final class TypicalBone extends I18nAlias {
     private static final String ATTR_NAME    = "name";
 
     private static final List<TypicalBone> BONE_LIST =
     private static final String ATTR_NAME    = "name";
 
     private static final List<TypicalBone> BONE_LIST =
-            new LinkedList<TypicalBone>();
+            new LinkedList<>();
     private static final AliasMap<TypicalBone> BONE_ALIAS_MAP =
     private static final AliasMap<TypicalBone> BONE_ALIAS_MAP =
-            new AliasMap<TypicalBone>();
+            new AliasMap<>();
 
     private static final List<TypicalBone> BONE_UNMODLIST =
             Collections.unmodifiableList(BONE_LIST);
 
     private static final List<TypicalBone> BONE_UNMODLIST =
             Collections.unmodifiableList(BONE_LIST);
index 7c5c438..ccf6eb0 100644 (file)
@@ -46,10 +46,10 @@ public final class TypicalMorph extends I18nAlias {
     private static final List<TypicalMorph> EMPTY = Collections.emptyList();
 
     private static final Map<MorphType, List<TypicalMorph>> TYPED_MAP =
     private static final List<TypicalMorph> EMPTY = Collections.emptyList();
 
     private static final Map<MorphType, List<TypicalMorph>> TYPED_MAP =
-            new EnumMap<MorphType, List<TypicalMorph>>(MorphType.class);
+            new EnumMap<>(MorphType.class);
 
     private static final AliasMap<TypicalMorph> MORPH_ALIAS_MAP =
 
     private static final AliasMap<TypicalMorph> MORPH_ALIAS_MAP =
-            new AliasMap<TypicalMorph>();
+            new AliasMap<>();
 
 
     static{
 
 
     static{
@@ -129,7 +129,7 @@ public final class TypicalMorph extends I18nAlias {
         NodeList morphList = groupElem.getElementsByTagName(ELEM_MORPH);
         int morphNo = morphList.getLength();
         List<TypicalMorph> groupedList =
         NodeList morphList = groupElem.getElementsByTagName(ELEM_MORPH);
         int morphNo = morphList.getLength();
         List<TypicalMorph> groupedList =
-                new ArrayList<TypicalMorph>(morphNo);
+                new ArrayList<>(morphNo);
 
         for(int idx = 0; idx < morphNo; idx++){
             Element morphElem = (Element) morphList.item(idx);
 
         for(int idx = 0; idx < morphNo; idx++){
             Element morphElem = (Element) morphList.item(idx);
index 465c3f5..1861728 100644 (file)
@@ -219,7 +219,7 @@ public final class DomUtils {
      */
     public static List<Element> getChildList(Element parent,
                                                String childTag){
      */
     public static List<Element> getChildList(Element parent,
                                                String childTag){
-        List<Element> result = new LinkedList<Element>();
+        List<Element> result = new LinkedList<>();
 
         for(Node node = parent.getFirstChild();
             node != null;
 
         for(Node node = parent.getFirstChild();
             node != null;
index 8afddf4..7950c83 100644 (file)
@@ -95,7 +95,7 @@ public final class SchemaUtil {
      */
     private static Source[] toLocalSourceArray(LocalXmlResource[] resArray)
             throws MalformedURLException, IOException{
      */
     private static Source[] toLocalSourceArray(LocalXmlResource[] resArray)
             throws MalformedURLException, IOException{
-        List<Source> sourceList = new ArrayList<Source>(resArray.length);
+        List<Source> sourceList = new ArrayList<>(resArray.length);
 
         for(LocalXmlResource resource : resArray){
             Source localSource = toLocalSource(resource);
 
         for(LocalXmlResource resource : resArray){
             Source localSource = toLocalSource(resource);
index 0d1c8de..56c7132 100644 (file)
@@ -58,7 +58,7 @@ public class XmlResourceResolver
         assert this.getClass().equals(THISCLASS);
 
         Map<URI, URI> map;
         assert this.getClass().equals(THISCLASS);
 
         Map<URI, URI> map;
-        map = new HashMap<URI, URI>();
+        map = new HashMap<>();
         map = Collections.synchronizedMap(map);
         this.uriMap = map;
 
         map = Collections.synchronizedMap(map);
         this.uriMap = map;