com.sapportals.wcm.protocol.webdav.sets

Class ArrayIntSet

java.lang.Object
  extended by com.sapportals.wcm.protocol.webdav.sets.ArrayIntSet
All Implemented Interfaces:
IntSet

public final class ArrayIntSet
extends Object
implements IntSet

Array storage of int set members

Copyright (c) SAP AG 2003


Method Summary
 boolean add(int i)
          Add i to the set
 void addInterval(int n, int m)
          Adds all integers [n, m[, starting from n up to, but not including m to the set
 void clear()
          Remove all members of the set.
 boolean contains(int i)
          Return if set contains i.
static ArrayIntSet getInstance()
           
static ArrayIntSet getInstance(int capacity)
           
static ArrayIntSet getInstance(IntSet set)
           
 float getStorageEfficiency()
           
 boolean isEmpty()
          Return if set is empty
 IntIterator iterator()
          Iterators over all int in set
 boolean remove(int i)
          Remove i from the set.
 void removeInterval(int n, int m)
          Removes all integers [n, m[, starting from n up to, but not including m from the set
 int size()
          Return number of elements in set
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static ArrayIntSet getInstance()

getInstance

public static ArrayIntSet getInstance(int capacity)

getInstance

public static ArrayIntSet getInstance(IntSet set)

contains

public boolean contains(int i)
Description copied from interface: IntSet
Return if set contains i.

Specified by:
contains in interface IntSet
Parameters:
i - to check
Returns:
if set contains i

add

public boolean add(int i)
Description copied from interface: IntSet
Add i to the set

Specified by:
add in interface IntSet
Parameters:
i - to add to set
Returns:
if i was added first time

remove

public boolean remove(int i)
Description copied from interface: IntSet
Remove i from the set.

Specified by:
remove in interface IntSet
Parameters:
i - to remove from set
Returns:
if i was member

addInterval

public void addInterval(int n,
                        int m)
Adds all integers [n, m[, starting from n up to, but not including m to the set

Specified by:
addInterval in interface IntSet
Parameters:
n - lower bound to add
m - upper bound (exclusive) to add

removeInterval

public void removeInterval(int n,
                           int m)
Removes all integers [n, m[, starting from n up to, but not including m from the set

Specified by:
removeInterval in interface IntSet
Parameters:
n - lower bound to remove
m - upper bound (exclusive) to remove

size

public int size()
Description copied from interface: IntSet
Return number of elements in set

Specified by:
size in interface IntSet
Returns:
set size

isEmpty

public boolean isEmpty()
Description copied from interface: IntSet
Return if set is empty

Specified by:
isEmpty in interface IntSet
Returns:
if set is empty

iterator

public IntIterator iterator()
Description copied from interface: IntSet
Iterators over all int in set

Specified by:
iterator in interface IntSet
Returns:
iterator over all int values

clear

public void clear()
Description copied from interface: IntSet
Remove all members of the set.

Specified by:
clear in interface IntSet

toString

public String toString()
Overrides:
toString in class Object

getStorageEfficiency

public float getStorageEfficiency()
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM


Copyright 2012 SAP AG Complete Copyright Notice