如果我有一个String列" A"在一个解析类。我在列中有5个对象" A"值:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>align</title>
<style type="text/css">
body{
margin: 0;
padding: 0;
}
div.maincontainer{
width: 60%;
height: auto;
position: absolute;
left: 20%;
background-color: black;
}
div.rowone{
width: 100%;
height: 320px;
background-color: brown;
position: absolute;
}
div.description{
width: 50%;
height: 100%;
background-color: orange;
position: absolute;
}
div.imagetwo
{
width: 25%;
height: 100%;
background-color: pink;
position: absolute;
left: 50%;
}
div.twoimages{
width: 25%;
height: 100%;
background-color: purple;
position: absolute;
left: 75%;
}
div.oneimage{
width: 100%;
height: 50%;
background-color: green;
}
div.twoimage{
width: 100%;
height: 50%;
background-color: blue;
}
div.rowtwo{
width: 100%;
height: 320px;
background-color: gray;
position: absolute;
top: 330px;
}
div.iimageone{
width: 50%;
height: 100%;
background-color: yellow;
position: absolute;
}
div.ithreeimages{
width: 25%;
height: 100%;
background-color: pink;
position: absolute;
left: 50%;
}
div.timageone{
width: 50%;
height: 50%;
background-color: blue;
position: absolute;
}
div.timagetwo
{
width: 50%;
height: 50%;
background-color: orange;
position: absolute;
left: 50%;
}
div.timagethree{
width: 100%;
height: 50%;
background-color: purple;
position: absolute;
top: 50%;
}
div.finalimage{
width: 25%;
height: 100%;
background-color: red;
position: absolute;
left: 75%;
}
</style>
</head>
<body>
<div class="maincontainer">
<div class="rowone">
<div class="description"></div>
<div class="imageone"></div>
<div class="imagetwo"></div>
<div class="twoimages">
<div class="oneimage"></div>
<div class="twoimage"></div>
</div>
</div>
<div class="rowtwo">
<div class="iimageone"></div>
<div class="ithreeimages">
<div class="timageone"></div>
<div class="timagetwo"></div>
<div class="timagethree"></div>
</div>
<div class="finalimage"></div>
</div>
</div>
</body>
</html>
如何检索这些对象,并将它们存储在HashSet中以供使用?
因此,如果我1- A'
2- B'
3- C'
4- D'
5- E'
HashSet值,它会显示A&#39;,B&#39;,C&#39;,D&#39;,E&#39;。
注意:我正在尝试将一个解析对象列表添加到hashSet中。所以我检索一个完整的列,就像我上面说的那样,并将其存储到一个hashSet中。
需要更多信息?请问{而不是system.out.println
。