-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathLStack.html
More file actions
295 lines (295 loc) · 11.7 KB
/
LStack.html
File metadata and controls
295 lines (295 loc) · 11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Sat Oct 18 15:11:47 PDT 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>LStack</title>
<meta name="date" content="2014-10-18">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="LStack";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">Crazy8</div>
<h2 title="Class LStack" class="title">Class LStack<T></h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>Crazy8.LStack<T></li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">LStack<T></span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">LSTack useses the LinkedList methods and structure to recreate
a stack class for Java. This remasks, effectively, some of the
methods as more accessible one, and conforms to the general idea
of what a stack is.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) int</code></td>
<td class="colLast"><code><strong><a href="../Crazy8/LStack.html#size">size</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) <a href="http://docs.oracle.com/javase/7/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a>></code></td>
<td class="colLast"><code><strong><a href="../Crazy8/LStack.html#stack">stack</a></strong></code> </td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../Crazy8/LStack.html#LStack()">LStack</a></strong>()</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a></code></td>
<td class="colLast"><code><strong><a href="../Crazy8/LStack.html#get(int)">get</a></strong>(int index)</code>
<div class="block">Get the value of an item at a certain index with the stack.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../Crazy8/LStack.html#isEmpty()">isEmpty</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../Crazy8/LStack.html#LStack()">LStack</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a></code></td>
<td class="colLast"><code><strong><a href="../Crazy8/LStack.html#peek()">peek</a></strong>()</code>
<div class="block">The stack peek method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a></code></td>
<td class="colLast"><code><strong><a href="../Crazy8/LStack.html#pop()">pop</a></strong>()</code>
<div class="block">The stack pop method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../Crazy8/LStack.html#push(T)">push</a></strong>(<a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a> value)</code>
<div class="block">The stack push method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../Crazy8/LStack.html#search(T)">search</a></strong>(<a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a> key)</code>
<div class="block">Iterate through the stack for the desired element.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="stack">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stack</h4>
<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a>> stack</pre>
</li>
</ul>
<a name="size">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>size</h4>
<pre>int size</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="LStack()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LStack</h4>
<pre>public LStack()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="LStack()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LStack</h4>
<pre>public void LStack()</pre>
</li>
</ul>
<a name="isEmpty()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEmpty</h4>
<pre>public boolean isEmpty()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>A boolean telling if the stack is empty or not.</dd></dl>
</li>
</ul>
<a name="search(java.lang.Object)">
<!-- -->
</a><a name="search(T)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>search</h4>
<pre>public int search(<a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a> key)</pre>
<div class="block">Iterate through the stack for the desired element.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>An int containing the index of a found element. -1 if it is not discovered.</dd></dl>
</li>
</ul>
<a name="push(java.lang.Object)">
<!-- -->
</a><a name="push(T)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>push</h4>
<pre>public void push(<a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a> value)</pre>
<div class="block">The stack push method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - The value to push.</dd></dl>
</li>
</ul>
<a name="pop()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pop</h4>
<pre>public <a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a> pop()</pre>
<div class="block">The stack pop method.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The popped item.</dd></dl>
</li>
</ul>
<a name="peek()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>peek</h4>
<pre>public <a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a> peek()</pre>
<div class="block">The stack peek method.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The top of the stack.</dd></dl>
</li>
</ul>
<a name="get(int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>get</h4>
<pre>public <a href="../Crazy8/LStack.html" title="type parameter in LStack">T</a> get(int index)</pre>
<div class="block">Get the value of an item at a certain index with the stack.
NOTE: Stack indices begin from 1, not zero.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - The index in the stack you want to get.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The item at the specified index.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
</body>
</html>