Index
All Classes and Interfaces|All Packages
B
- Bike - Class in fr.univtln.bruno.samples.java101.tp2.impl
-
Lightweight Vehicle implementation representing a bike.
- Bike(String) - Constructor for class fr.univtln.bruno.samples.java101.tp2.impl.Bike
C
- Car - Class in fr.univtln.bruno.samples.java101.tp2.impl
-
Concrete Vehicle implementation representing a car.
- Car(String) - Constructor for class fr.univtln.bruno.samples.java101.tp2.impl.Car
- Car(String, String, String, int) - Constructor for class fr.univtln.bruno.samples.java101.tp2.impl.Car
- category() - Static method in class fr.univtln.bruno.samples.java101.tp2.impl.Bike
-
Static category used to demonstrate method hiding.
- category() - Static method in class fr.univtln.bruno.samples.java101.tp2.impl.Car
-
Static category used to demonstrate method hiding.
- category() - Static method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricBike
-
Static category used to demonstrate method hiding.
- category() - Static method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
-
Static category used to demonstrate method hiding.
- category() - Static method in class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
-
Static method used to demonstrate method hiding in subclasses.
- charge() - Method in interface fr.univtln.bruno.samples.java101.tp2.api.Electric
-
Charges the vehicle's battery.
- charge() - Method in interface fr.univtln.bruno.samples.java101.tp2.api.Rechargeable
-
Recharge the vehicle's battery to full capacity.
- charge() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricBike
-
Charges the vehicle's battery.
- charge() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
-
Charges the vehicle's battery.
- copy() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Bike
-
Covariant copy: returns a Bike instance.
- copy() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Car
-
Covariant copy: returns a Car instance.
- copy() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricBike
-
Covariant copy: returns an ElectricBike instance.
- copy() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
-
Covariant copy: returns an ElectricCar instance.
- copy() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ServiceCar
-
Covariant copy: returns a ServiceCar instance.
- copy() - Method in class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
-
Abstract factory-like copy that subclasses implement with covariant return types (returning their own concrete type).
D
- DemoVehicle - Class in fr.univtln.bruno.samples.java101.tp2.app
-
Small post-lecture demo showcasing: - inheritance (Vehicle -> Car/Bike/ElectricCar) - abstract classes and partial implementations (Vehicle.description()) - interfaces (+ default methods) and multiple inheritance (Drivable, Electric, Maintainable) - delegation (Driver -> Drivable) - covariant returns (copy()) - static method hiding (category())
- description() - Method in class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
-
Concrete method in the abstract base: shows dynamic dispatch by calling the abstract move() from a shared template.
- Drivable - Interface in fr.univtln.bruno.samples.java101.tp2.api
-
Drivable capability contract.
- drive() - Method in interface fr.univtln.bruno.samples.java101.tp2.api.Drivable
-
Performs the driving action for the underlying vehicle implementation.
- drive() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Bike
-
Performs the driving action for the underlying vehicle implementation.
- drive() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Car
-
Performs the driving action for the underlying vehicle implementation.
- drive() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricBike
-
Performs the driving action for the underlying vehicle implementation.
- drive() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
-
Performs the driving action for the underlying vehicle implementation.
- drive() - Method in class fr.univtln.bruno.samples.java101.tp2.service.Driver
-
Delegates the drive call to the underlying Drivable vehicle.
- Driver - Class in fr.univtln.bruno.samples.java101.tp2.service
-
Simple service object illustrating delegation: the driver delegates driving operations to a Drivable vehicle it holds.
- Driver(String, Drivable) - Constructor for class fr.univtln.bruno.samples.java101.tp2.service.Driver
E
- Electric - Interface in fr.univtln.bruno.samples.java101.tp2.api
-
Marker interface for electric vehicles.
- ElectricBike - Class in fr.univtln.bruno.samples.java101.tp2.impl
-
Electric bike: lightweight electric vehicle.
- ElectricBike(String) - Constructor for class fr.univtln.bruno.samples.java101.tp2.impl.ElectricBike
- ElectricBike(String, String, String, int) - Constructor for class fr.univtln.bruno.samples.java101.tp2.impl.ElectricBike
- ElectricCar - Class in fr.univtln.bruno.samples.java101.tp2.impl
-
Concrete Vehicle representing an electric car.
- ElectricCar(String) - Constructor for class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
- ElectricCar(String, String, String, int) - Constructor for class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
F
- fr.univtln.bruno.samples.java101.tp2.api - package fr.univtln.bruno.samples.java101.tp2.api
-
API contracts for the Vehicle domain (TP2): capability interfaces, default methods and multiple inheritance demonstrations.
- fr.univtln.bruno.samples.java101.tp2.app - package fr.univtln.bruno.samples.java101.tp2.app
-
Applications and entry points (mains) demonstrating TP2 concepts.
- fr.univtln.bruno.samples.java101.tp2.impl - package fr.univtln.bruno.samples.java101.tp2.impl
-
Concrete implementations of the Vehicle domain model.
- fr.univtln.bruno.samples.java101.tp2.model - package fr.univtln.bruno.samples.java101.tp2.model
-
Abstract domain models for Vehicle (TP2): shared invariants and partial implementations used by concrete types.
- fr.univtln.bruno.samples.java101.tp2.service - package fr.univtln.bruno.samples.java101.tp2.service
-
Services and composition/delegation components for operating the Vehicle domain (e.g.
G
- getBatteryLevel() - Method in interface fr.univtln.bruno.samples.java101.tp2.api.Rechargeable
-
Returns the current battery level.
- getBatteryLevel() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricBike
-
Returns current battery level as a percentage.
- getBatteryLevel() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
-
Returns current battery level as a percentage.
- getFuelLevel() - Method in interface fr.univtln.bruno.samples.java101.tp2.api.Refuelable
-
Returns the current fuel level.
- getFuelLevel() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Car
-
Returns the current fuel level as a percentage.
- getId() - Method in class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
-
Final accessor to illustrate that subclasses cannot override it.
- getName() - Method in class fr.univtln.bruno.samples.java101.tp2.service.Driver
- getPowerSource() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Car
-
Returns technical specifications about the motor/engine.
- getPowerSource() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
-
Returns technical specifications about the motor/engine.
- getPowerSource() - Method in class fr.univtln.bruno.samples.java101.tp2.model.MotorVehicle
-
Returns technical specifications about the motor/engine.
I
M
- main(String[]) - Static method in class fr.univtln.bruno.samples.java101.tp2.app.DemoVehicle
- Maintainable - Interface in fr.univtln.bruno.samples.java101.tp2.api
-
Maintenance capability contract used to demonstrate default-method conflicts and their resolution when combined with other interfaces.
- make - Variable in class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
- Manufacturer - Class in fr.univtln.bruno.samples.java101.tp2.service
-
Composition-centric example: a Manufacturer produces Vehicles.
- Manufacturer(String) - Constructor for class fr.univtln.bruno.samples.java101.tp2.service.Manufacturer
- model - Variable in class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
- MotorVehicle - Class in fr.univtln.bruno.samples.java101.tp2.model
-
Abstract motor vehicle: vehicles with an engine/motor.
- MotorVehicle(String) - Constructor for class fr.univtln.bruno.samples.java101.tp2.model.MotorVehicle
- MotorVehicle(String, String, String, int) - Constructor for class fr.univtln.bruno.samples.java101.tp2.model.MotorVehicle
- move() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Bike
-
Describes the main motion behaviour of the vehicle.
- move() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Car
-
Describes the main motion behaviour of the vehicle.
- move() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricBike
-
Describes the main motion behaviour of the vehicle.
- move() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
-
Describes the main motion behaviour of the vehicle.
- move() - Method in class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
-
Describes the main motion behaviour of the vehicle.
P
- produce(String) - Method in class fr.univtln.bruno.samples.java101.tp2.service.Manufacturer
-
Produces a new car instance with the given id.
R
- Rechargeable - Interface in fr.univtln.bruno.samples.java101.tp2.api
-
Contract for vehicles that can be recharged.
- refuel(double) - Method in interface fr.univtln.bruno.samples.java101.tp2.api.Refuelable
-
Refuel the vehicle to the specified percentage.
- refuel(double) - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Car
-
Refuel the car to the specified percentage (clamped 0..100).
- Refuelable - Interface in fr.univtln.bruno.samples.java101.tp2.api
-
Contract for vehicles that can be refueled.
S
- ServiceCar - Class in fr.univtln.bruno.samples.java101.tp2.impl
-
Service car combining Car's drivable features with maintenance checks.
- ServiceCar(String) - Constructor for class fr.univtln.bruno.samples.java101.tp2.impl.ServiceCar
- start() - Method in interface fr.univtln.bruno.samples.java101.tp2.api.Drivable
-
Default starting behaviour for drivable vehicles.
- start() - Method in interface fr.univtln.bruno.samples.java101.tp2.api.Maintainable
-
Default pre-flight/pre-drive check sequence.
- start() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.Car
-
Provides the default Drivable start behaviour for cars.
- start() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricBike
-
Default starting behaviour for drivable vehicles.
- start() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ElectricCar
-
Default starting behaviour for drivable vehicles.
- start() - Method in class fr.univtln.bruno.samples.java101.tp2.impl.ServiceCar
-
Resolves the default-method conflict by composing Maintainable and Car behaviours in a defined order.
- startVehicle() - Method in class fr.univtln.bruno.samples.java101.tp2.service.Driver
-
Delegates the start call to the underlying Drivable vehicle.
T
- toString() - Method in class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
V
- Vehicle - Class in fr.univtln.bruno.samples.java101.tp2.model
-
Abstract domain type for TP2 examples.
- Vehicle(String) - Constructor for class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
- Vehicle(String, String, String, int) - Constructor for class fr.univtln.bruno.samples.java101.tp2.model.Vehicle
Y
B C D E F G I M P R S T V YAll Classes and Interfaces|All Packages