X-Git-Url: http://git.osdn.net/view?p=mikutoga%2FPmd2XML.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fjp%2Fsfjp%2Fmikutoga%2Fpmd%2Fmodel%2FPmdModel.java;h=82dda6d13896415de7954d90e4e4bb2e196550a8;hp=cc342595364c2e78d079526d6562fb9cffa0e817;hb=abcb0a55f7087667f35fcc696fc476bfb1408df1;hpb=91f6ac21aa8fad94b3336ba9d79ee38d9c3836de;ds=sidebyside diff --git a/src/main/java/jp/sfjp/mikutoga/pmd/model/PmdModel.java b/src/main/java/jp/sfjp/mikutoga/pmd/model/PmdModel.java index cc34259..82dda6d 100644 --- a/src/main/java/jp/sfjp/mikutoga/pmd/model/PmdModel.java +++ b/src/main/java/jp/sfjp/mikutoga/pmd/model/PmdModel.java @@ -29,23 +29,23 @@ public class PmdModel { private final I18nText modelName = new I18nText(); private final I18nText description = new I18nText(); - private final List vertexList = new ArrayList(); - private final List surfaceList = new ArrayList(); - private final List materialList = new LinkedList(); + private final List vertexList = new ArrayList<>(); + private final List surfaceList = new ArrayList<>(); + private final List materialList = new LinkedList<>(); - private final List boneList = new ArrayList(); - private final List boneGroupList = new ArrayList(); + private final List boneList = new ArrayList<>(); + private final List boneGroupList = new ArrayList<>(); - private final List ikChainList = new ArrayList(); + private final List ikChainList = new ArrayList<>(); private final Map> morphMap = - new EnumMap>(MorphType.class); + new EnumMap<>(MorphType.class); - private final List rigidList = new ArrayList(); + private final List rigidList = new ArrayList<>(); private final List rigidGroupList = - new ArrayList(); + new ArrayList<>(); - private final List jointList = new ArrayList(); + private final List jointList = new ArrayList<>(); private ToonMap toonMap = new ToonMap(); @@ -59,10 +59,10 @@ public class PmdModel { assert this.vertexList instanceof RandomAccess; assert this.surfaceList instanceof RandomAccess; - this.morphMap.put(MorphType.EYEBROW, new ArrayList()); - this.morphMap.put(MorphType.EYE, new ArrayList()); - this.morphMap.put(MorphType.LIP, new ArrayList()); - this.morphMap.put(MorphType.EXTRA, new ArrayList()); + this.morphMap.put(MorphType.EYEBROW, new ArrayList<>()); + this.morphMap.put(MorphType.EYE, new ArrayList<>()); + this.morphMap.put(MorphType.LIP, new ArrayList<>()); + this.morphMap.put(MorphType.EXTRA, new ArrayList<>()); return; } @@ -235,7 +235,7 @@ public class PmdModel { * @return モーフ頂点リスト */ private List getAllMorphVertexList(){ - List allList = new ArrayList(); + List allList = new ArrayList<>(); for(MorphType type : this.morphMap.keySet()){ if(type.isBase()) continue; @@ -261,9 +261,9 @@ public class PmdModel { */ private List getUniqueMorphVertexList( List allList ){ - List result = new ArrayList(); + List result = new ArrayList<>(); - Set mergedVertexSet = new HashSet(); + Set mergedVertexSet = new HashSet<>(); for(MorphVertex morphVertex : allList){ Vertex vertex = morphVertex.getBaseVertex(); @@ -297,7 +297,7 @@ public class PmdModel { ListUtil.assignIndexedSerial(result); Map numberedMap = - new HashMap(); + new HashMap<>(); for(MorphVertex morphVertex : result){ Vertex vertex = morphVertex.getBaseVertex(); numberedMap.put(vertex, morphVertex); @@ -341,7 +341,7 @@ public class PmdModel { * @return トリミングされた面リスト */ private List trimmingSurfaceList(){ - Set materialedSurfaceSet = new HashSet(); + Set materialedSurfaceSet = new HashSet<>(); for(Material material : this.materialList){ if(material == null) continue; for(Surface surface : material){ @@ -352,7 +352,7 @@ public class PmdModel { materialedSurfaceSet.removeAll(this.surfaceList); - List result = new ArrayList(); + List result = new ArrayList<>(); for(Surface surface : this.surfaceList){ if(surface == null) continue; result.add(surface); @@ -378,7 +378,7 @@ public class PmdModel { * @return トリミングされた頂点リスト */ private List trimmingVertexList(){ - Set surfacedVertexSet = new HashSet(); + Set surfacedVertexSet = new HashSet<>(); for(Surface surface : this.surfaceList){ if(surface == null) continue; for(Vertex vertex : surface){ @@ -388,7 +388,7 @@ public class PmdModel { surfacedVertexSet.removeAll(this.vertexList); - List result = new ArrayList(); + List result = new ArrayList<>(); for(Vertex vertex : this.vertexList){ if(vertex == null) continue; result.add(vertex);