package vn.edu.hust.student.dynamicpool.dal.server.logic;

import java.util.ArrayList;
import java.util.List;

public class Pool implements IPool  {

	private DeviceInfo deviceInfo;
	private Retangle retangle;
	private List<Segment> segments;
	private IConverter converter;
	
	public Pool(){
		converter = new PoolConverter();
		segments = new ArrayList<>();
	}
	
	public Pool(DeviceInfo device){
		this();
		setDeviceInfo(device);
	}
	
	@Override
	public DeviceInfo getDeviceInfo() {
		return deviceInfo;
	}

	@Override
	public Retangle getRetangle() {
		return retangle;
	}

	public void setDeviceInfo(DeviceInfo deviceInfo) {
		this.deviceInfo = deviceInfo;
	}

	@Override
	public void setRetangle(Retangle retangle) {
		this.retangle = retangle;
	}

	@Override
	public List<Segment> getSegments() {
		return segments;
	}

	public void setSegments(List<Segment> segments) {
		this.segments = segments;
	}

	@Override
	public void convertDeviceInfoToRect() {
		setRetangle(converter.convertDeviceInfoToRect(deviceInfo));
	}
}

@@ -148,16 +148,43 @@
 ool  %7B%0D%0A
+%09private String clientName;
 %0D%0A%09priva
@@ -1099,12 +1099,200 @@
 ));%0D%0A%09%7D%0D
+%0A%0D%0A%09@Override%0D%0A%09public String getClientName() %7B%0D%0A%09%09return this.clientName;%0D%0A%09%09%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public void setClientName(String clientName) %7B%0D%0A%09%09this.clientName=clientName;%0D%0A%09%09%0D%0A%09%7D%0D%0A%09%0D
 %0A%7D%0D%0A

update Pool