com.sun.jini.mercury
Class StreamKey

java.lang.Object
  extended by com.sun.jini.mercury.StreamKey

 class StreamKey
extends Object

Class used as the key value for an associated LogStream object in a collection of type java.util.Map.

Since:
1.1
Author:
Sun Microsystems, Inc.

Field Summary
private  File file
          Holds the File attribute for the associated stream.
private  int hash
          Holds the cached value of the file field's hashCode.
private  StreamType type
          Holds the "enumeration" type for the associated stream.
 
Constructor Summary
StreamKey(File file, StreamType type)
          Simple constructor that accepts File and StreamType arguments and then assigns them to the appropriate internal fields.
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

private File file
Holds the File attribute for the associated stream.


type

private StreamType type
Holds the "enumeration" type for the associated stream.


hash

private int hash
Holds the cached value of the file field's hashCode.

Constructor Detail

StreamKey

StreamKey(File file,
          StreamType type)
Simple constructor that accepts File and StreamType arguments and then assigns them to the appropriate internal fields. Neither argument can be null. The File argument must represent an absolute pathname.

Throws:
IllegalArgumentException - thrown if either of the arguments are null or if the file argument does not represent an absolute pathname.
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.