Java 5.0 Tiger: A Developer's Notebook

First Edition Juni 2004
ISBN 978-0-596-00738-6
Seiten 200
EUR29.00, SFR49.90


Weitere Informationen zu diesem Buch

Inhaltsverzeichnis | Index | Probekapitel | Kolophon | Rezensionen |
Download der Beispiele |


Index

	
[ A ], [ B ], [ C ], [ D ], [ E ], [ F ], [ G ], [ H ], [ I ], [ J ], [ L ], [ M ], [ N ], [ O ], [ P ], [ Q ], [ R ], [ S ], [ T ], [ U ], [ V ], [ W ], [ X ], [ Z ]

A[ Top ]
annotation types
      custom, 90
      Deprecated, 87
      documentation, 96
      retention, 95
      SuppressWarnings, 88
      target definition, 94
annotations
      annotating, 93
      annotation type comparison, 83
      full, 84
      inheritance in, 99
      marker annotations, 84
      meta-annotations, 93
      reflection, 101
      single-value, 84
arguments
      parameterized types as, 21
      variable arguments (see varargs)
      variable-length argument list, 71
      zero-length lists, 76
ArrayBlockingQueue, 152
arrays
      conversion, automatic, 79
      for/in loop, 109
      iteration and, 110
      java.util.Arrays class, 1
      methods, 1
      type-safe, 15
Arrays.deepEquals( ) method, 3
Arrays.deep.ToString( ) method, 3
Arrays.toString( ) method, 3
atomic operations, 165
atomic types, 165
autoboxing, 61

B[ Top ]
blocking queues, 148
      ArrayBlockingQueue, 152
      DelayQueue, 152
      LinkedBlockingQueue, 152
      PriorityBlockingQueue, 152
      SynchronousQueue, 152
      timeouts, 152
BMP (Basic Multilingual Plan), 12
Boolean values, boolean values and, 64
boxing
      unboxing, 62
            conditional operators and, 65
            control statements, 66
      values, primitives, 61

C[ Top ]
cached thread executor, 155
Callable interface, 158
char values, surrogate range, 12
classes
      collection, extending, 116
      ConcurrentHashMap, 147
      CopyOnWriteArraylist, 147
      CopyOnWriteArraySet, 147
      enum reference, 36
      enums as, 37
      Executors, 155
      for/in loop, 115
      Formatter, 132
      java.util.Arrays, 1
      java.util.Comparator, 8
      java.util.Queue, 4
      synchronizer classes, 164
      value-specific class bodies, 55
      wrapper classes, 60
code, introspective, 80
codepoints, 12
      BMP (Basic Multilingual Plan), 12
      supplementary characters, 12
collection classes
      extending, 116
      iteration, 111
      threads and, 146
concatenation, for/in loop, 120
ConcurrentHashMap class, 147
conditional operators, unboxing and, 65
constructors
      enums, 38
      Formatter class, 132
control statements, unboxing and, 66
convenience methods, Formatter class
      format( ), 139
      printf( ), 140
conversion
      arrays, automatic, 79
      primitives to wrapper types, 60
      types, Formatter class, 134
      wrappers to primitives, 62
CopyOnWriteArrayList class, 147
CopyOnWriteArraySet class, 147
CountDownLatch, 164
covariant returns, 11
CyclicBarrier, 165

D[ Top ]
declaring
      enums inline, 40
      for/in loop, 110
decrementing wrapper types, 63
deep.Equals( ) method, 3
DelayQueue, 152
delegation, varargs and, 72
Deprecated annotation type, 83, 87
documentation, annotation types, 96
Documented meta-annotation, 93
DownloadStatus enum, 40

E[ Top ]
ellipsis (...), varargs and, 71
enhanced for, 107
enumerated types (see enums)
EnumMap, creating, 47
enums, 35
      in arrays, 46
      as classes, 37
      contructors, 38
      creating, 35-40
      declarations inline, 40
      defining manually, 57
      DownloadStatus, 40
      extending, 58
      extensions, 37
      as indices, 46
      integers, 38
      interating over, 41
      interface implementation, 54
      jump tables and, 44
      as keys, 46
      methods, adding to, 51
      sets, 48
      simple enums, 36
      switch statement and, 42
      values, importing, 126
      value-specific class bodies, 55
erasure, type safety and, 27
exceptions, threads and, 142
Exchanger, synchronizer classes, 165
execution logic versus thread logic, 154
Executors class, 155
      scheduling execution, 161
      as service, 156
ExecutorService, executing tasks without, 160
expressions, for/in loop, 109
extensions
      collection classes, 116
      enum, 37

F[ Top ]
fixed thread executor, 155
flags, formatting and, 138
for loop, 108
foreach, 107
for/in loop
      array type, 109
      classes in, 115
      declaration, 110
      expressions, 109
      list item removal, 121
      list position, 119
      typecasts, unnecessary, 113
      variable value, 119
for/in statement, 107
      iterators and, 107
format( ) convenience method, Formatter class, 139
formatted output, writing, 133
Formatter class
      constructors, 132
      convenience methods
            format( ), 139
            printf( ), 140
      conversion types, 134
      creating, 132
      formatted output, 133
formatting
      flags and, 138
      precision, 136
full annotations, 84

G[ Top ]
generic types, 25
      writing, 30
generics, 15
      placeholders, 17
getList( ) method, 21

H[ Top ]
hand-over-hand locking, 168
hash codes, 4
hashCode( ) method, 4

I[ Top ]
import method, 124
import static method, 124
importing
      enumerated type values, 126
      members, multiple with same name, 128
      static members, 123
            shadowing imports, 130
            wildcards, 125
incrementing wrapper types, 63
inheritance, annotations, 99
Inherited meta-annotation, 93
inline declarations, enums, 40
integers, enums, 38
interfaces, enums and implementation, 54
introspective code, 80
iteration
      arrays and, 110
      collections, 111
      for/in statement, 107
      iterating over enums, 41
      manual iterations, 117
      parameterized types, 19
      variable-argument lists, 74

J[ Top ]
java.util.Arrays class, 1
java.util.Map, 18
jump tables, enums and, 44

L[ Top ]
LinkedBlockingQueue, 152
lint warnings, 24
list position, for/in loop, 119
lists
      item removal, for/in loop, 121
      String concatenation, 120
      type-safe, 15
locking
      hand-over-hand, 168
      synchronization and, 167
loops
      for, 108
      for/in, 107

M[ Top ]
marker annotations, 84
member types, 125
members
      importing, multiple with same name, 128
      static, importing, 123
meta-annotations, 93
metadata, 82
method resolution, 67
methods
      adding to enums, 51
      arrays, 1
      Arrays.deepToString( ), 3
      Arrays.toString( ), 3
      deep.Equals( ), 3
      getList( ), 21
      hashCode( ), 4
      import, 124
      import static, 124
      next( ), 20
      offer( ), 5
      overloading, 128
      Override annotation, 85
      overriding
            in superclasses, 10
      poll( ), 5
      printf( ), 79
      printList( ), 29
      Unicode 4.0, 11
      values( ), 41

N[ Top ]
natural ordering, 7
next( ) method, 20

O[ Top ]
objects, callable, 158
offer( ) method, 5, 149
operators, conditional, unboxing and, 65
ordering, natural ordering, 7
ordering queues, comparators, 6
output, formatted, 133
overloading methods, 128
Override annotation type, 83
      methods and, 85
overriding methods in superclasses, 10
overriding return types, 9

P[ Top ]
parameterized types, 17
      as arguments, 21
      cast as raw, 27
      iteration, 19
      restricting parameters, 32
      returning, 22
      static variables and, 31
      as type parameters, 23
placeholders, generics, 17
poll( ) method, 5
precision, formatting and, 136
primitive types, 18
primitives, 60
      converting from wrapper types, 62
      converting to wrapper types, 60
      values, boxed, 61
printf( ) convenience method, Formatter class, 140
printf( ) method, 79
printList( ) method, 29
PriorityBlockingQueue, 152
PriorityQueue, 6

Q[ Top ]
Queue interface, offer( ) method, 149
queues
      blocking queues, 148
      comparators and, 6
      natural ordering, 7

R[ Top ]
range( ) operator, 50
reflection
      annotations, 101
      type safety and, 27
retention, annotation types, 95
Retention meta-annotation, 93
return types, overriding, 9
returns
      covariant returns, 11
      parameterized types, 22

S[ Top ]
scheduled thread executor, 155
scheduling execution, 161
semaphores, 164
services, Executor class as, 156
sets of enums, 48
shadowing imports, static methods, 130
simple enums, 36
single thread executor, 155
single-value annotations, 84
static imports, 123
      shadowing, 130
      wildcards in, 125
static members, importing, 123
static variables, parameterization and, 31
StringBuffer, replacing with StringBuilder code, 12
StringBuilder, 12
superclasses, overriding methods, 10
supplementary characters, codepoints, 12
SuppressWarnings annotation, 25
SuppressWarnings annotation type, 83, 88
surrogate pairs, 12
switch statement, enums, 42
synchronization
      advanced synchronization options, 164
      locking and, 167
synchronizer classes, 164
      CountDownLatch, 164
      CyclicBarrier, 165
      Exchanger, 165
      semaphores, 164
Synchronous Queue, 152

T[ Top ]
Target meta-annotation, 93
ternary operator, 65
threads
      collections and, 146
      exceptions, catching, 142
      thread logic versus execution logic, 154
Tiger's new features, 1
timeouts, blocking queues, 152
toString( ) method, 3
type safety
      arrays, 15
      erasure and, 27
      java.util.Map and, 18
      lists, 15
      reflection, 27
types
      atomic, 165
      generic, 25
            writing, 30
      parameterized, 17
            iteration, 19
            restricting parameters, 32
      primitive, 18
      unnecessary casting, 113
      wildcards, 29
type-safety, 15
typing, 15, 70

U[ Top ]
unboxing, 62
      conditional operators and, 65
      control statements, 66
Unicode 4.0, 11

V[ Top ]
values
      enums, importing, 126
      primitives, boxed, 61
      variables, for/in loop, 119
values( ) method, iterating over enums, 41
value-specific class bodies, 55
varargs, 71
      delegation and, 72
      ellipsis (...), 71
variable arguments (see varargs)
variable-argument lists
      iterating over, 74
variable-length argument list, 71
variables
      static variables, parameterization and, 31
      value, for/in loop, 119
VM (Virtual Machine) primitive, converting to wrapper types, 61

W[ Top ]
warnings, SuppressWarnings annotation, 25
wildcards
      static imports, 125
      types, 29
wrapper classes, 60
wrapper types
      converting from primitives, 60
      converting to primitives, 62
      incrementing/decrementing, 63

X[ Top ]
XDoclet, annotations and, 85

Z[ Top ]
zero-length argument lists, 76

	

Zurück zu Java 5.0 Tiger: A Developer's Notebook


Themen

Buchreihen

Special Interest

International Sites

O'Reilly China O'Reilly France O'Reilly USA O'Reilly Japan O'Reilly Taiwan