对象 object

基础对象,所有对象均继承于此

继承关系

%0 object object dispose() equals() toString() toJSON() valueOf() Buffer Buffer new Buffer() operator[] isBuffer() concat() length resize() append() write() fill() indexOf() compare() copy() readUInt8() readUInt16LE() readUInt16BE() readUInt32LE() readUInt32BE() readUIntLE() readUIntBE() readInt8() readInt16LE() readInt16BE() readInt32LE() readInt32BE() readIntLE() readIntBE() readInt64LE() readInt64BE() readFloatLE() readFloatBE() readDoubleLE() readDoubleBE() writeUInt8() writeUInt16LE() writeUInt16BE() writeUInt32LE() writeUInt32BE() writeUIntLE() writeUIntBE() writeInt8() writeInt16LE() writeInt16BE() writeInt32LE() writeInt32BE() writeIntLE() writeIntBE() writeInt64LE() writeInt64BE() writeFloatLE() writeFloatBE() writeDoubleLE() writeDoubleBE() slice() hex() base64() toArray() toString() object->Buffer Cipher Cipher new Cipher() name keySize ivSize blockSize paddingMode() encrypt() decrypt() object->Cipher DatagramPacket DatagramPacket data address port object->DatagramPacket DbConnection DbConnection type close() begin() commit() rollback() trans() execute() format() object->DbConnection DBRow DBRow operator[] operator[String] object->DBRow Digest Digest size update() digest() object->Digest EventEmitter EventEmitter new EventEmitter() defaultMaxListeners on() addListener() prependListener() once() prependOnceListener() off() removeListener() removeAllListeners() setMaxListeners() getMaxListeners() listeners() listenerCount() eventNames() emit() object->EventEmitter EventInfo EventInfo operator[String] code reason type target object->EventInfo Fiber Fiber caller traceInfo join() object->Fiber GridFS GridFS files chunks retrieve() store() exists() remove() object->GridFS Handler Handler new Handler() invoke() object->Handler HeapGraphEdge HeapGraphEdge type name description getFromNode() getToNode() object->HeapGraphEdge HeapGraphNode HeapGraphNode type name description id shallowSize childs object->HeapGraphNode HeapSnapshot HeapSnapshot time root nodes diff() getNodeById() save() object->HeapSnapshot HttpClient HttpClient new HttpClient() cookies timeout maxBodySize enableCookie autoRedirect userAgent request() get() post() del() put() patch() object->HttpClient HttpCollection HttpCollection operator[String] clear() has() first() all() add() set() remove() object->HttpCollection HttpCookie HttpCookie new HttpCookie() name value domain path expires httpOnly secure parse() match() object->HttpCookie HttpUploadData HttpUploadData fileName contentType contentTransferEncoding body object->HttpUploadData Image Image width height format type colorsTotal transparent progressive alphaBlending getData() save() colorAllocate() colorAllocateAlpha() colorClosest() colorClosestHWB() colorClosestAlpha() colorExact() colorExactAlpha() colorResolve() colorResolveAlpha() colorDeallocate() clip() getPixel() getTrueColorPixel() setPixel() setThickness() line() rectangle() filledRectangle() polygon() openPolygon() filledPolygon() ellipse() filledEllipse() arc() filledArc() fill() fillToBorder() colorReplace() clone() resample() crop() flip() rotate() convert() copy() copyMerge() copyMergeGray() copyResized() copyResampled() copyRotated() filter() affine() gaussianBlur() object->Image Int64 Int64 new Int64() hi lo compare() shiftLeft() shiftRight() and() or() xor() add() sub() toNumber() toString() object->Int64 LevelDB LevelDB has() get() mget() set() mset() mremove() remove() forEach() between() begin() commit() close() object->LevelDB List List new List() operator[] length freeze() resize() push() indexOf() lastIndexOf() push() pushArray() pop() slice() concat() every() some() filter() forEach() map() reduce() sort() toArray() object->List Lock Lock new Lock() acquire() release() count() object->Lock LruCache LruCache new LruCache() size timeout clear() has() get() set() remove() isEmpty() object->LruCache Map Map new Map() operator[String] size clear() has() get() put() set() remove() isEmpty() object->Map Message Message new Message() TEXT BINARY value params type data body length stream response lastError read() readAll() write() end() isEnded() clear() sendTo() readFrom() object->Message MongoCollection MongoCollection operator[String] find() findOne() findAndModify() insert() save() update() remove() runCommand() drop() ensureIndex() reIndex() dropIndex() dropIndexes() getIndexes() getCollection() object->MongoCollection MongoCursor MongoCursor skip() limit() sort() hasNext() next() count() size() forEach() map() toArray() hint() object->MongoCursor MongoDB MongoDB operator[String] fs getCollection() runCommand() oid() close() object->MongoDB MongoID MongoID object->MongoID PKey PKey new PKey() name keySize publicKey genRsaKey() genEcKey() isPrivate() clone() importKey() importFile() exportPem() exportDer() encrypt() decrypt() sign() verify() object->PKey Queue Queue new Queue() length add() offer() remove() poll() element() peek() clear() toArray() object->Queue Redis Redis onsuberror command() set() setNX() setXX() mset() msetNX() append() setRange() getRange() strlen() bitcount() get() mget() getset() decr() incr() setBit() getBit() exists() type() keys() del() expire() ttl() persist() rename() renameNX() sub() unsub() psub() unpsub() pub() getHash() getList() getSet() getSortedSet() dump() restore() close() object->Redis RedisHash RedisHash set() setNX() mset() get() mget() incr() getAll() keys() len() exists() del() object->RedisHash RedisList RedisList push() pop() rpush() rpop() set() get() insertBefore() insertAfter() remove() trim() len() range() object->RedisList RedisSet RedisSet add() remove() len() exists() members() pop() randMember() object->RedisSet RedisSortedSet RedisSortedSet add() score() incr() remove() len() count() range() rangeRev() rank() rankRev() object->RedisSortedSet Regex Regex lastIndex global ignoreCase multiline exec() test() object->Regex SandBox SandBox new SandBox() global add() addScript() remove() clone() run() resolve() require() object->SandBox Smtp Smtp new Smtp() timeout socket connect() command() hello() login() from() to() data() quit() object->Smtp Stat Stat name size mode mtime atime ctime uid gid isWritable() isReadable() isExecutable() isHidden() isDirectory() isFile() isSymbolicLink() isMemory() isSocket() object->Stat Stats Stats new Stats() operator[String] inc() dec() add() reset() uptime() object->Stats Stream Stream read() write() close() copyTo() object->Stream TcpServer TcpServer new TcpServer() socket handler stats run() asyncRun() stop() object->TcpServer TextColor TextColor notice warn error highLight object->TextColor Timer Timer clear() object->Timer UrlObject UrlObject new UrlObject() href protocol slashes auth username password host hostname port path pathname search query hash parse() format() resolve() normalize() object->UrlObject X509Cert X509Cert new X509Cert() version serial issuer subject notBefore notAfter ca pathlen usage type publicKey next load() loadFile() loadRootCerts() verify() dump() clear() object->X509Cert X509Crl X509Crl new X509Crl() load() loadFile() dump() clear() object->X509Crl X509Req X509Req new X509Req() subject publicKey load() loadFile() exportPem() exportDer() sign() object->X509Req XmlAttr XmlAttr localName value name namespaceURI prefix nodeName nodeValue object->XmlAttr XmlNamedNodeMap XmlNamedNodeMap operator[] length item() getNamedItem() object->XmlNamedNodeMap XmlNode XmlNode nodeType nodeName nodeValue ownerDocument parentNode childNodes firstChild lastChild previousSibling nextSibling hasChildNodes() normalize() cloneNode() lookupPrefix() lookupNamespaceURI() insertBefore() insertAfter() appendChild() replaceChild() removeChild() object->XmlNode XmlNodeList XmlNodeList operator[] length item() object->XmlNodeList ZipFile ZipFile namelist() infolist() getinfo() read() readAll() extract() extractAll() write() close() object->ZipFile ZipInfo ZipInfo filename date compress_type compress_size file_size password data object->ZipInfo ZmqSocket ZmqSocket new ZmqSocket() type bind() connect() recv() send() close() object->ZmqSocket MSSQL MSSQL use() DbConnection->MSSQL MySQL MySQL rxBufferSize txBufferSize use() DbConnection->MySQL SQLite SQLite fileName timeout backup() DbConnection->SQLite Service Service new Service() name onstop onpause oncontinue install() remove() start() stop() restart() run() isInstalled() isRunning() EventEmitter->Service WebSocket WebSocket new WebSocket() url protocol origin readyState onopen onmessage onclose onerror close() send() EventEmitter->WebSocket WebView WebView visible onload onmove onresize onclosed onmessage setHtml() print() close() wait() postMessage() EventEmitter->WebView Worker Worker new Worker() onmessage postMessage() EventEmitter->Worker AsyncWait AsyncWait end() Handler->AsyncWait Chain Chain new Chain() append() Handler->Chain HandlerEx HandlerEx handler stats onerror() Handler->HandlerEx Routing Routing new Routing() append() all() get() post() del() put() patch() Handler->Routing SslHandler SslHandler new SslHandler() verification ca handler Handler->SslHandler HttpHandler HttpHandler new HttpHandler() crossDomain forceGZIP maxHeadersCount maxBodySize serverName HandlerEx->HttpHandler WebSocketHandler WebSocketHandler new WebSocketHandler() maxSize HandlerEx->WebSocketHandler DBResult DBResult insertId affected fields List->DBResult Condition Condition new Condition() wait() notify() notifyAll() Lock->Condition Event Event new Event() isSet() set() pulse() clear() wait() Lock->Event Semaphore Semaphore new Semaphore() wait() post() trywait() Lock->Semaphore HttpMessage HttpMessage protocol headers keepAlive upgrade maxHeadersCount maxBodySize socket hasHeader() firstHeader() allHeader() addHeader() setHeader() removeHeader() Message->HttpMessage WebSocketMessage WebSocketMessage new WebSocketMessage() masked maxSize Message->WebSocketMessage HttpRequest HttpRequest new HttpRequest() method address queryString cookies form query HttpMessage->HttpRequest HttpResponse HttpResponse new HttpResponse() status cookies addCookie() redirect() sendHeader() HttpMessage->HttpResponse BlockQueue BlockQueue new BlockQueue() put() take() Queue->BlockQueue BufferedStream BufferedStream new BufferedStream() stream charset EOL readText() readLine() readLines() readUntil() writeText() writeLine() Stream->BufferedStream SeekableStream SeekableStream seek() tell() rewind() size() readAll() truncate() eof() flush() stat() Stream->SeekableStream Socket Socket new Socket() family type remoteAddress remotePort localAddress localPort timeout connect() bind() listen() accept() recv() recvfrom() send() sendto() Stream->Socket SslSocket SslSocket new SslSocket() verification ca peerCert stream connect() accept() Stream->SslSocket SubProcess SubProcess pid stdin stdout kill() wait() findWindow() BufferedStream->SubProcess File File name fd chmod() SeekableStream->File MemoryStream MemoryStream new MemoryStream() setTime() clone() clear() SeekableStream->MemoryStream HttpServer HttpServer new HttpServer() crossDomain forceGZIP maxHeadersCount maxBodySize serverName httpStats onerror() TcpServer->HttpServer SslServer SslServer new SslServer() verification ca TcpServer->SslServer HttpsServer HttpsServer new HttpsServer() verification ca HttpServer->HttpsServer XmlCharacterData XmlCharacterData data length substringData() appendData() insertData() deleteData() replaceData() XmlNode->XmlCharacterData XmlDocument XmlDocument new XmlDocument() inputEncoding xmlStandalone xmlVersion doctype documentElement head title body load() getElementsByTagName() getElementsByTagNameNS() getElementById() getElementsByClassName() createElement() createElementNS() createTextNode() createComment() createCDATASection() createProcessingInstruction() XmlNode->XmlDocument XmlDocumentType XmlDocumentType name publicId systemId XmlNode->XmlDocumentType XmlElement XmlElement namespaceURI prefix localName tagName id textContent innerHTML className attributes getAttribute() getAttributeNS() setAttribute() setAttributeNS() removeAttribute() removeAttributeNS() hasAttribute() hasAttributeNS() getElementsByTagName() getElementsByTagNameNS() getElementById() getElementsByClassName() XmlNode->XmlElement XmlProcessingInstruction XmlProcessingInstruction target data XmlNode->XmlProcessingInstruction XmlComment XmlComment XmlCharacterData->XmlComment XmlText XmlText splitText() XmlCharacterData->XmlText XmlCDATASection XmlCDATASection XmlText->XmlCDATASection

成员函数

dispose

强制回收对象,调用此方法后,对象资源将立即释放

object.dispose();

equals

比较当前对象与给定的对象是否相等

Boolean object.equals(object expected);

调用参数:

返回结果:


toString

返回对象的字符串表示,一般返回 "[Native Object]",对象可以根据自己的特性重新实现

String object.toString();

返回结果:


toJSON

返回对象的 JSON 格式表示,一般返回对象定义的可读属性集合

Value object.toJSON(String key = "");

调用参数:

返回结果:


valueOf

返回对象本身的数值

Value object.valueOf();

返回结果: