C# Class clojure.lang.Symbol

Inheritance: AFn, IObj, Named, IComparable, ISerializable
显示文件 Open project: richhickey/clojure-clr Class Usage Examples

Protected Properties

Property Type Description
_hash int
_name string
_ns string

Public Methods

Method Description
CompareTo ( object obj ) : int

Compare this symbol to another object.

Equals ( object obj ) : bool

Determine if an object is equal to this symbol.

Uses value semantics, value determined by namespace name and symbol name.

GetHashCode ( ) : int

Get the hash code.

ToString ( ) : string

Return a string representing the symbol.

getName ( ) : string

Gets the symbol name.

getNamespace ( ) : string

Get the namespace name.

meta ( ) : IPersistentMap
operator ( ) : bool
withMeta ( IPersistentMap meta ) : IObj

Create a copy with new metadata.

Protected Methods

Method Description
Symbol ( SerializationInfo info, StreamingContext context ) : System

Construct a Symbol during deserialization.

Private Methods

Method Description
ComputeHashCode ( ) : int

Compute the hash code for the symbol.

GetObjectData ( SerializationInfo info, StreamingContext context ) : void
Symbol ( IPersistentMap meta, string ns_interned, string name_interned ) : System

Construct a symbol from interned namespace name and symbol name, with given metadata.

Symbol ( string ns_interned, string name_interned ) : System

Construct a symbol from interned namespace name and symbol name.

create ( String nsname ) : Symbol
create ( String ns, String name ) : Symbol
intern ( string nsname ) : Symbol
intern ( string ns, string name ) : Symbol
invoke ( Object obj ) : object
invoke ( Object obj, Object notFound ) : object

Method Details

CompareTo() public method

Compare this symbol to another object.
public CompareTo ( object obj ) : int
obj object The object to compare to.
return int

Equals() public method

Determine if an object is equal to this symbol.
Uses value semantics, value determined by namespace name and symbol name.
public Equals ( object obj ) : bool
obj object The object to compare to.
return bool

GetHashCode() public method

Get the hash code.
public GetHashCode ( ) : int
return int

Symbol() protected method

Construct a Symbol during deserialization.
protected Symbol ( SerializationInfo info, StreamingContext context ) : System
info System.Runtime.Serialization.SerializationInfo
context System.Runtime.Serialization.StreamingContext
return System

ToString() public method

Return a string representing the symbol.
public ToString ( ) : string
return string

getName() public method

Gets the symbol name.
public getName ( ) : string
return string

getNamespace() public method

Get the namespace name.
public getNamespace ( ) : string
return string

meta() public method

public meta ( ) : IPersistentMap
return IPersistentMap

operator() public static method

public static operator ( ) : bool
return bool

withMeta() public method

Create a copy with new metadata.
public withMeta ( IPersistentMap meta ) : IObj
meta IPersistentMap The new metadata.
return IObj

Property Details

_hash protected_oe property

The cached hashcode.
protected int _hash
return int

_name protected_oe property

The name of the symbol.
This string must be interned.
protected string _name
return string

_ns protected_oe property

The name of the namespace for this symbol (if namespace-qualified).
This string must be interned.
protected string _ns
return string