|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Jan 2004
Città: Montignoso(MS)
Messaggi: 9505
|
[JAVA] java.util.vector...
Scusate la domanda stupida... sapreste darmi un link per trovare la versione stampabile della sola specifica (se e' in italiano anche meglio...) di vector.java !??!
thks
__________________
"Il Meglio che si possa ottenere è evitare il peggio." I.C. |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Jan 2001
Città: Milano
Messaggi: 5707
|
cos'e' la specifica?
la documentazione la trovi qui: http://java.sun.com/j2se/1.4.2/docs/...il/Vector.html se vuoi il sorgente lo trovi dentro il J2SDK |
|
|
|
|
|
#3 | |
|
Senior Member
Iscritto dal: Jan 2004
Città: Montignoso(MS)
Messaggi: 9505
|
Quote:
__________________
"Il Meglio che si possa ottenere è evitare il peggio." I.C. |
|
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Jul 1999
Città: Torino
Messaggi: 2221
|
Giusto! E che cavolo!!
|
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: May 2003
Città: Rimini
Messaggi: 2279
|
La documentazione di Sun dice tutto, dai metodi alle variabili di classe e così via... Se vuoi qualcosa che ti "spieghi" come si usa, allora guarda su un manuale. Ad esempio Thinking in Java di Bruce Eckel è liberamente scaricabile, se non ti va giù l'inglese però mi sa che trovi pochissimo in rete, ti conviene comprarlo un bel manuale...
Byez
__________________
Gigabyte 965P-DS3 ¤ E6600@400*8 ¤ Scythe Ninja Plus Rev.B ¤ Ram 4GB ¤ HD SSD Crucial M4 128GB
Gainward 4850 Golden Sample ¤ Antec NEO 550HE ¤ CM Centurion 534 ¤ Dell Ultrasharp U2312HM Notebook Asus N551JW ¤ i7-4750HQ ¤ nVidia 960M 4GB ¤ 16GB DDR3 ¤ SSD Intel 850EVO 500GB |
|
|
|
|
|
#6 | |
|
Member
Iscritto dal: Nov 2002
Messaggi: 160
|
Quote:
Guarda ho rimediato questo pezzo di specifica, in rete, per i principali metodi... Per il resto guardati la documentazione al link che ti ha postato linkv... la capirebbe pure un cranioleso... public class Vector { // OVERVIEW: A Vector is an ordered collection of objects. A typical // Vector is [ obj_0, obj_1, obj_2, ..., obj_n-1 ]. public Vector () // EFFECTS: Initializes this to an empty vector: []. boolean add(Object o) // MODIFIES: this // EFFECTS: Appends the specified element to the end of this // Vector. Always returns true. // If this_pre = [ obj_0, obj_1, ..., obj_n-1 ] then // this_post = [ obj_0, obj_1, ..., obj_n-1, o ] public Object get(int index) throws ArrayIndexOutOfBoundsException // EFFECTS: If the index is out of range (index < 0 or index >= // number of elements in this) throws an // ArrayIndexOutOfBoundsException. Otherwise, returns the // element in this at position index (where the index of the // first element is 0). // e.g., if this = [ obj_0, obj_1, obj_2 ] then // get(1) would return obj_1 // get(3) would throw an ArrayIndexOutOfBoundsException public int size() // EFFECTS: Returns the number of elements in the vector. // e.g., if this = [ obj_0, obj_1, obj_2 ] then // size() would return 3. public Enumeration elements() // EFFECTS: Returns an enumeration of the elements of this in order. // For example, to print all elements of a vector v: // // for (java.util.Enumeration e = v.elements() ; e.hasMoreElements() // System.out.println(e.nextElement()); // } // // See the Java API spec for more methods. } |
|
|
|
|
|
|
#7 | |
|
Senior Member
Iscritto dal: Jan 2001
Città: Milano
Messaggi: 5707
|
Quote:
ehm si, interessante ma ... che te ne fai??? e' un vettore di oggetti, mica una classe che comanda una sonda spaziale. Ci son tre metodi messi in croce dal significato del tutto ovvio, l'unica note interessante che trovi sulla documentazione e' che l'implementazione non e' thread safe. |
|
|
|
|
|
|
#8 | |
|
Senior Member
Iscritto dal: Feb 2003
Messaggi: 3532
|
Quote:
scusate se mi intrometto, che vor dì???? |
|
|
|
|
|
|
#9 | |
|
Senior Member
Iscritto dal: Jan 2001
Città: Milano
Messaggi: 5707
|
Quote:
thread safe significa che un parte di un programma (funzione, metodo) puo' essere chiamato da piu' processi senza il rischio di interazioni non volute tra gli stessi. Cmq ho detto una sciocchezza, sono le nuove classi di collection che non sono thread safe. |
|
|
|
|
|
|
#10 | |
|
Senior Member
Iscritto dal: Feb 2003
Messaggi: 3532
|
Quote:
grzie per la informazione |
|
|
|
|
|
|
#11 | |
|
Senior Member
Iscritto dal: Jan 2001
Città: Milano
Messaggi: 5707
|
Quote:
esatto, quando hai piu' thread |
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 23:36.



















