src/Pure/PIDE/document_status.scala
changeset 68760 0626cae56b6f
parent 68759 4247e91fa21d
child 68761 8bb51b3de39f
equal deleted inserted replaced
68759:4247e91fa21d 68760:0626cae56b6f
   170     val empty: Nodes_Status = new Nodes_Status(Map.empty)
   170     val empty: Nodes_Status = new Nodes_Status(Map.empty)
   171   }
   171   }
   172 
   172 
   173   final class Nodes_Status private(private val rep: Map[Document.Node.Name, Node_Status])
   173   final class Nodes_Status private(private val rep: Map[Document.Node.Name, Node_Status])
   174   {
   174   {
   175     def keys_iterator: Iterator[Document.Node.Name] = rep.keysIterator
       
   176 
       
   177     def defined(name: Document.Node.Name): Boolean = rep.isDefinedAt(name)
   175     def defined(name: Document.Node.Name): Boolean = rep.isDefinedAt(name)
   178     def get(name: Document.Node.Name): Option[Node_Status] = rep.get(name)
   176     def get(name: Document.Node.Name): Option[Node_Status] = rep.get(name)
   179 
   177 
   180     def overall_node_status(name: Document.Node.Name): Overall_Node_Status.Value =
   178     def overall_node_status(name: Document.Node.Name): Overall_Node_Status.Value =
   181       rep.get(name) match {
   179       rep.get(name) match {
   185       }
   183       }
   186 
   184 
   187     def + (entry: (Document.Node.Name, Node_Status)): Nodes_Status =
   185     def + (entry: (Document.Node.Name, Node_Status)): Nodes_Status =
   188       new Nodes_Status(rep + entry)
   186       new Nodes_Status(rep + entry)
   189 
   187 
   190     def - (name: Document.Node.Name): Nodes_Status =
       
   191       new Nodes_Status(rep - name)
       
   192 
       
   193     override def hashCode: Int = rep.hashCode
   188     override def hashCode: Int = rep.hashCode
   194     override def equals(that: Any): Boolean =
   189     override def equals(that: Any): Boolean =
   195       that match {
   190       that match {
   196         case other: Nodes_Status => rep == other.rep
   191         case other: Nodes_Status => rep == other.rep
   197         case _ => false
   192         case _ => false