Project

General

Profile

Task #5861

static boolean containsSingleObject(Collection<?> collection)

Added by Sergey Smolov over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Andrei Tatarnikov
Category:
-
Target version:
Start date:
04/20/2015
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Published in build:

Description

Implement a utility method with the following signature:

static boolean containsSingleObject(Collection<?> collection)

The method returns true when the specified collection contains exactly one element, false otherwise.

The method name can be changed to the one you think is more suitable.

History

#1

Updated by Sergey Smolov over 4 years ago

  • Priority changed from Normal to Low
#2

Updated by Sergey Smolov over 4 years ago

  • Status changed from New to Closed

This method declaration is longer than it's body && it's not extendible. So paranoic mode off:)

Also available in: Atom PDF