Javolution 6.0.0 java
AtomicSortedTableImpl.java
Go to the documentation of this file.
1
/*
2
* Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3
* Copyright (C) 2012 - Javolution (http://javolution.org/)
4
* All rights reserved.
5
*
6
* Permission to use, copy, modify, and distribute this software is
7
* freely granted, provided that this notice is preserved.
8
*/
9
package
javolution.util.internal.table.sorted;
10
11
import
javolution
.
util
.
internal
.
table
.
AtomicTableImpl
;
12
import
javolution
.
util
.
service
.
SortedTableService
;
13
import
javolution
.
util
.
service
.
TableService
;
14
18
public
class
AtomicSortedTableImpl
<E>
extends
AtomicTableImpl
<E> implements
19
SortedTableService
<E> {
20
21
private
static
final
long
serialVersionUID
= 0x600L;
// Version.
22
23
public
AtomicSortedTableImpl
(
TableService<E>
target
) {
24
super(
target
);
25
}
26
27
@Override
28
public
synchronized
boolean
addIfAbsent
(E
element
) {
29
boolean
changed =
target
().addIfAbsent(
element
);
30
if
(changed && !
updateInProgress
())
immutable
=
cloneTarget
();
31
return
changed;
32
}
33
34
@Override
35
public
int
positionOf
(E
element
) {
36
return
targetView
().positionOf(
element
);
37
}
38
39
@Override
40
public
SortedTableService<E>
threadSafe
() {
41
return
this
;
42
}
43
44
@Override
45
protected
SortedTableService<E>
targetView
() {
46
return
(
SortedTableService<E>
) super.targetView();
47
}
48
50
@Override
51
protected
SortedTableService<E>
target
() {
52
return
(
SortedTableService<E>
) super.target();
53
}
54
55
}
javolution.util.internal.collection.AtomicCollectionImpl.updateInProgress
final boolean updateInProgress()
Definition:
AtomicCollectionImpl.java:200
javolution.util.internal.table.sorted.AtomicSortedTableImpl.positionOf
int positionOf(E element)
Definition:
AtomicSortedTableImpl.java:35
javolution
javolution.util.internal
javolution.util.service
Definition:
BitSetService.java:9
javolution.util.internal.collection.AtomicCollectionImpl.cloneTarget
CollectionService< E > cloneTarget()
Definition:
AtomicCollectionImpl.java:191
javolution.util.internal.table
Definition:
AtomicTableImpl.java:9
javolution.util.internal.table.sorted.AtomicSortedTableImpl.serialVersionUID
static final long serialVersionUID
Definition:
AtomicSortedTableImpl.java:21
javolution.util.internal.table.sorted.AtomicSortedTableImpl.target
SortedTableService< E > target()
Definition:
AtomicSortedTableImpl.java:51
javolution.util.internal.table.AtomicTableImpl
Definition:
AtomicTableImpl.java:23
javolution.util.internal.table.sorted.AtomicSortedTableImpl.threadSafe
SortedTableService< E > threadSafe()
Definition:
AtomicSortedTableImpl.java:40
javolution.util.internal.table.sorted.AtomicSortedTableImpl.targetView
SortedTableService< E > targetView()
Definition:
AtomicSortedTableImpl.java:45
javolution.util.service.TableService
Definition:
TableService.java:21
javolution.util.service.SortedTableService
Definition:
SortedTableService.java:17
javolution.util.internal.table.sorted.AtomicSortedTableImpl.addIfAbsent
synchronized boolean addIfAbsent(E element)
Definition:
AtomicSortedTableImpl.java:28
javolution.util
Definition:
FastBitSet.java:9
javolution.util.internal.table.AtomicTableImpl.element
E element()
Definition:
AtomicTableImpl.java:62
javolution.util.internal.table.sorted.AtomicSortedTableImpl
Definition:
AtomicSortedTableImpl.java:19
javolution.util.internal.table.sorted.AtomicSortedTableImpl.AtomicSortedTableImpl
AtomicSortedTableImpl(TableService< E > target)
Definition:
AtomicSortedTableImpl.java:23
javolution.util.internal.collection.AtomicCollectionImpl.immutable
volatile CollectionService< E > immutable
Definition:
AtomicCollectionImpl.java:52
core-java
src
main
java
javolution
util
internal
table
sorted
AtomicSortedTableImpl.java
Generated by
1.8.18