com.starteam
Class PropertyCollection

java.lang.Object
  extended by com.starteam.StarTeamCollection
      extended by com.starteam.PropertyCollection
All Implemented Interfaces:
java.lang.Iterable, java.util.Collection
Direct Known Subclasses:
Audit.Type.PropertyCollection, Change.Type.PropertyCollection, Group.Type.PropertyCollection, Label.Type.PropertyCollection, Project.Type.PropertyCollection, PromotionModel.Type.PropertyCollection, PromotionState.Type.PropertyCollection, Share.Type.PropertyCollection, TaskDependency.Type.PropertyCollection, User.Type.PropertyCollection, View.Type.PropertyCollection, ViewMember.Type.PropertyCollection, ViewMemberRevision.Type.PropertyCollection, WorkRecord.Type.PropertyCollection

public class PropertyCollection
extends StarTeamCollection

A Collection of Properties supported by a specific Type


Constructor Summary
PropertyCollection()
          Construct a empty collection of properties
PropertyCollection(Property p)
          Construct a collection of properties containing only the given property
PropertyCollection(Property[] pp)
          Construct a collection of properties consisting of all the properties in the given array
 
Method Summary
 void clear()
          Removes all of the elements from this collection.
 boolean contains(java.lang.Object o)
          Returns true if the specified object is a member of this collection overloaded to check for the key of an object, e.g.
 Property find(int propertyID)
          Return the Property object belonging to this type with the specified property ID.
 Property find(java.lang.String propertyName)
          Return the Property object belonging to this type with the specified property name.
 Type getType()
          Returns the Type associated with this set of properties
 void insert(int index, java.lang.Object o)
          insert the object into the collection at the specified index
 void set(int index, java.lang.Object o)
          Sets the object at a given index in the collection, and removes the (existing) object at that index in the collection, provided that the object does not already exist in the collection
 
Methods inherited from class com.starteam.StarTeamCollection
add, addAll, addAll, addTo, attach, containsAll, detach, get, getSyncRoot, indexOf, isEmpty, isFixedSize, isModified, isReadOnly, isSynchronized, iterator, positionOf, remove, removeAll, removeAt, resetCapacity, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

PropertyCollection

public PropertyCollection()
Construct a empty collection of properties


PropertyCollection

public PropertyCollection(Property p)
Construct a collection of properties containing only the given property

Parameters:
p - the property to add to the collection

PropertyCollection

public PropertyCollection(Property[] pp)
Construct a collection of properties consisting of all the properties in the given array

Parameters:
pp - an array of properties to add to the collection
Method Detail

getType

public Type getType()
Returns the Type associated with this set of properties

Returns:
the Type associated with this set of properties

find

public Property find(java.lang.String propertyName)
              throws java.lang.IllegalArgumentException
Return the Property object belonging to this type with the specified property name. This will return null if the property is not found.

Parameters:
propertyName - the name of the desired Property object
Returns:
the property with the specified name or NULL if none exists
Throws:
java.lang.IllegalArgumentException
See Also:
Property.getName()

find

public Property find(int propertyID)
Return the Property object belonging to this type with the specified property ID. This will return null if the property is not found.

Parameters:
propertyID - the property ID of the desired Property object
Returns:
the property with the specified ID or NULL if none exists
See Also:
Property.getID()

insert

public void insert(int index,
                   java.lang.Object o)
insert the object into the collection at the specified index

Overrides:
insert in class StarTeamCollection
Parameters:
index - the position at which the object should be inserted
o - the object to insert

set

public void set(int index,
                java.lang.Object o)
Sets the object at a given index in the collection, and removes the (existing) object at that index in the collection, provided that the object does not already exist in the collection

Overrides:
set in class StarTeamCollection
Parameters:
index - A valid index into the collection.
o - The object to be set.

contains

public boolean contains(java.lang.Object o)
Returns true if the specified object is a member of this collection overloaded to check for the key of an object, e.g. int id or String name

Specified by:
contains in interface java.util.Collection
Overrides:
contains in class StarTeamCollection
Parameters:
o - the object to test for
Returns:
true if the specified object is a member of this collection

clear

public void clear()
Removes all of the elements from this collection.

Specified by:
clear in interface java.util.Collection
Overrides:
clear in class StarTeamCollection


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.