|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMappa
public class Mappa
Field Summary | |
---|---|
protected java.util.Vector |
infrastrutture
Contiene tutte le infrastrutture. |
protected static java.lang.String |
IS
Per formato file. |
protected double |
maxX
Estremo del dominio. |
protected double |
maxY
Estremo del dominio. |
protected double |
minX
Estremo del dominio. |
protected double |
minY
Estremo del dominio. |
protected static java.lang.String |
NI
Per formato file. |
protected static java.lang.String |
NP
Per formato file. |
protected static java.lang.String |
NS
Per formato file. |
protected static java.lang.String |
PT
Per formato file. |
protected int |
quanteInfrastrutture
Numero di infrastrutture presenti. |
protected int |
quantiSegmenti
Numero di segmenti di via presenti. |
protected int |
quantiSnodi
Numero di punti di snodo presenti. |
protected java.util.Vector |
segmenti
Contiene tutti i segmenti di via. |
protected java.util.Vector |
snodi
Contiene tutti i punti di snodo. |
protected static java.lang.String |
SV
Per formato file. |
Constructor Summary | |
---|---|
Mappa()
|
Method Summary | |
---|---|
SegmentoVia |
ilSegmento(int i)
Ritorna il segmento di via i-esimo, null se non esiste. |
int |
indiceSegmento(SegmentoVia s)
Ritorna l'indice occupato dal segmento nella mappa, ovvero l'indice i tale che s==ilSegmento(i), ritorna -1 se il segmento non c'e'. |
boolean |
inserisci(Infrastruttura i)
Aggiunge un'infrastruttura alla mappa. |
boolean |
inserisci(SegmentoVia s)
Aggiunge un segmento di via alla mappa. |
boolean |
inserisci(Snodo p)
Aggiunge uno snodo alla mappa. |
Infrastruttura |
laInfrastruttura(int i)
Ritorna l'infrastruttura i-esima, null se non esiste. |
boolean |
leggi(MyReader rd)
Legge questa mappa, non solleva eccezioni ma se ci sono stati problemi ritorna false, se la mappa e' stata letta ritorna true; per poter essere letta con successo, la mappa deve essere vuota. |
Snodo |
loSnodo(int i)
Ritorna il punto di snodo i-esimo, null se non esiste. |
int |
numeroInfrastrutture()
Ritorna il numero di infrastrutture. |
int |
numeroSegmenti()
Ritorna il numero di segmenti di via. |
int |
numeroSnodi()
Ritorna il numero di punti di snodo. |
void |
provaLeggere(MyReader rd)
Legge questa mappa, sollevando eccezione se ci sono problemi; per poter essere letta con successo, la mappa deve essere vuota. |
void |
scrivi(java.io.PrintStream file)
Scrive la mappa. |
double |
xMassima()
X massima del dominio |
double |
xMinima()
X minima del dominio |
double |
yMassima()
Y massima del dominio |
double |
yMinima()
Y minima del dominio |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector segmenti
protected java.util.Vector snodi
protected java.util.Vector infrastrutture
protected int quantiSegmenti
protected int quantiSnodi
protected int quanteInfrastrutture
protected double minX
protected double minY
protected double maxX
protected double maxY
protected static final java.lang.String NP
protected static final java.lang.String NS
protected static final java.lang.String NI
protected static final java.lang.String PT
protected static final java.lang.String SV
protected static final java.lang.String IS
Constructor Detail |
---|
public Mappa()
Method Detail |
---|
public double xMinima()
public double yMinima()
public double xMassima()
public double yMassima()
public int numeroSnodi()
public int numeroSegmenti()
public int numeroInfrastrutture()
public Snodo loSnodo(int i)
public SegmentoVia ilSegmento(int i)
public int indiceSegmento(SegmentoVia s)
public Infrastruttura laInfrastruttura(int i)
public boolean inserisci(Snodo p)
public boolean inserisci(SegmentoVia s)
public boolean inserisci(Infrastruttura i)
public void scrivi(java.io.PrintStream file)
public void provaLeggere(MyReader rd) throws java.lang.Exception
java.lang.Exception
public boolean leggi(MyReader rd)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |