You are on page 1of 1

while(input.

hasNextLine());
string.split("\\.") za do tocka ili ("\\s+") za da trgne whitespaces

PrintWriter(outputStream)
printW.flush()

ExceptionRandom(arg za toa sto sakas da sedi vo messageot){


super(String.format())}

Collections.min(shapes).getArea(); kade shapes e arraylist i se zima minimalnata


area

shapes.stream().filter(x -> x.getType().equals(Type.Square)).count();


list.sort(Collections.reverseOrder()); svrtena

String[] Colors = {"RED", "GREEN", "BLUE"};


return String.format("C: %-5s%-10s%10.2f", id, Colors[color.ordinal()],
weight());

list.sort(Comparator.comparing(Shape::weight) moze da se zameni argumentot za


funkcija ili drug field
times.sort(Time::compareTo) i guess raboti i vaka bez comparing

return
Comparator.comparing(Component::getWeight).thenComparing(Component::getColor).compa
re(this, o); sporeduva this i o po weight pa po color

if(orderedComponents.stream().anyMatch(i -> i.getPosition() == position)) anyMatch


Returns whether any elements of this stream match the provided predicate

OrderedComponent c1 = orderedComponents.stream().filter(orderedComponent ->


orderedComponent.getPosition() == pos1).findFirst().orElse(null); se filtrira za da
se dobie component so pos1 a ako ne postoi vrakja null

You might also like