FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java/src/main/java/com/types/DataStructure.java at Development · ailvcheng/Java · GitHub
ailvcheng
/
Java
Public
forked from
TheAlgorithms/Java
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java
/
src
/
main
/
java
/
com
/
types
/
DataStructure.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (49 loc) · 1.26 KB
Breadcrumbs
Java
/
src
/
main
/
java
/
com
/
types
/
DataStructure.java
Copy path
File metadata and controls
57 lines (49 loc) · 1.26 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
package
com
.
types
;
import
java
.
util
.
Iterator
;
/**
* This interface is to define basic functionality expected out of any implementation class
* Since this is a data structure it should have the flexibility to contain any kind of object hence it has been made generic
* Any implementation class need not to be thread safe or it could be depending on the implementation class how does it want to behave.
*
* @param <T>
*/
public
interface
DataStructure
<
T
>
extends
Iterator
<
T
> {
/**
* Method to add element in the structure
*
* @param t element
* @return boolean
*/
boolean
add
(
T
t
);
/**
* Method to remove the given object from structure
*
* @param o element
* @return boolean
*/
boolean
remove
(
T
o
);
/**
* Method to get Iterator to parse on the given structure
*
* @return iterator
*/
Iterator
<
T
>
iterator
();
/**
* Method to check if structure is empty
*
* @return boolean
*/
boolean
isEmpty
();
/**
* Method to get all the elements of data structure in array
*
* @return arr
*/
Object
[]
toArray
();
/**
* Method to get the size or number of elements in structure
*
* @return size
*/
int
size
();
}
Back
|
FazBrowse Home
|
New Git URL