Java Reference
In-Depth Information
Return Type
Name
Description
Real
* (Real)
Multiply
Boolean
> (Object)
Greater than
Real
- ()
Negate
Real
- (Real)
Subtract
Boolean
>= (Object)
Greater than or equal to
Real
+ (Real)
Add
The supertype of Collection is Object. Note that Set is a subclass of
Collection but offers no properties or operations beyond that of Collection.
Table 14-8
Collection Properties
Type
Name
Description
Integer
size
Returns the size of this Collection
Boolean
isEmpty
Returns true if this Collection is empty
Table 14-9
Collection Operations
Return Type
Name
Description
Collection
remove (Object)
Removes the specified element from this
Collection, if contained, and returns this
Collection.
Set
toSet ()
Converts this collection to a Set.
List
toList ()
Converts this collection to a List.
Boolean
containsAll
Returns true if this collection contains each
(Collection)
element contained in the specified collection; oth-
erwise, returns false . Returns this Collection.
Collection
removeAll (Object)
Removes all elements contained in the specified
collection from this Collection, if contained, and
returns this Collection.
Collection
addAll (Collection)
Adds all elements to the Collection and returns
this Collection.
String
toString (String)
Concatenates each contained element (using
toString()), separated by the specified String.
(continues)
 
Search WWH ::




Custom Search