SemWeb : SemWeb.Util Namespace
StatementMap Class

A hashtable specialized for statements.

public class StatementMap

Remarks

Since the Statement type is a struct, and the .NET 1.1 build of this library does not use generics, this class is provided to avoid needing to box statements in Hashtables.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.0, 1.0.6.2, 1.0.7.0

Members

See Also: Inherited members from object.

Public Constructors

Creates a new instance of this class.
Creates a new instance of this class specifying a capacity and load factor.

Public Properties

[read-only]
Count int . The number of mappings in the StatementMap.
default property
Item (SemWeb.Statement) object . Gets or sets a key-value pair.
[read-only]
Keys StatementList . Returns a collection of all of the keys in the StatementMap.
[read-only]
Values IEnumerable . Returns a collection of all of the values in the StatementMap.

Public Methods

Clear ()
Clears the contents of the StatementMap.
ContainsKey (SemWeb.Statement) : bool
Returns whether a statement is a key in the StatementMap.
Remove (SemWeb.Statement)
Removes a mapping from the StatementMap using the key of the mapping.

Member Details

StatementMap Constructor

Creates a new instance of this class.

public StatementMap ()

Remarks

None.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

StatementMap Constructor

Creates a new instance of this class specifying a capacity and load factor.

public StatementMap (int capacity, float loadFactor)

Parameters

capacity
See the documentation for System.Collections.Hashtable.
loadFactor
See the documentation for System.Collections.Hashtable.

Exceptions

Type Reason
ArgumentException Documentation for this section has not yet been entered.
ArgumentOutOfRangeException Documentation for this section has not yet been entered.

Remarks

None.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

Clear Method

Clears the contents of the StatementMap.

public virtual void Clear ()

Remarks

None.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

ContainsKey Method

Returns whether a statement is a key in the StatementMap.

public bool ContainsKey (SemWeb.Statement key)

Parameters

key
A statement.

Returns

Whether the statement is a key that has been added to the StatementMap.

Remarks

None.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

Count Property

The number of mappings in the StatementMap.

public int Count { get; }

Value

The number of key-value pairs in the StatementMap.

Remarks

None.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

Item Property

Gets or sets a key-value pair.

This is the default property for this class.

public object this [SemWeb.Statement key] { set; get; }

Parameters

key
A statement.

Value

The corresponding value for the key.

Remarks

None.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

Keys Property

Returns a collection of all of the keys in the StatementMap.

public StatementList Keys { get; }

Value

A StatementList containing the keys in the StatementMap.

Remarks

The returned object may not be a new instance; that is, the same instance may be returned by future calls to Keys, and so it should not be modified by the caller.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

Remove Method

Removes a mapping from the StatementMap using the key of the mapping.

public virtual void Remove (SemWeb.Statement key)

Parameters

key
A statement.

Remarks

None.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

Values Property

Returns a collection of all of the values in the StatementMap.

public IEnumerable Values { get; }

Value

A collection of all of the values in the StatementMap.

Remarks

The returned object may not be a new instance; that is, the same instance may be returned by future calls to Values, and so it should not be modified by the caller.

Requirements

Namespace: SemWeb.Util
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0