public class PairStorage
extends java.lang.Object
Map
.Constructor and Description |
---|
PairStorage(java.lang.String _info) |
PairStorage(java.lang.String _info,
java.lang.String name,
java.lang.String value)
Convenience constructor for the common case with just one key/value pair.
|
Modifier and Type | Method and Description |
---|---|
void |
addPair(java.lang.String name,
java.lang.Object value) |
boolean |
definesSupersetOf(PairStorage ps)
Checks if the given
PairStorage has at least all the mappings that this instance has. |
boolean |
equals(java.lang.Object obj)
The default equals method does not work as required in our case, so we have to provide our own.
|
java.lang.String |
getInfo() |
java.util.TreeMap |
getPairs() |
int |
hashCode()
To keep hashCode results consistent with equals, we have to do our own hashCode calculations.
|
void |
setInfo(java.lang.String $5) |
void |
setPairs(java.util.TreeMap $6) |
java.lang.String |
toString() |
public PairStorage(java.lang.String _info)
public PairStorage(java.lang.String _info, java.lang.String name, java.lang.String value)
public void addPair(java.lang.String name, java.lang.Object value)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean definesSupersetOf(PairStorage ps)
PairStorage
has at least all the mappings that this instance has.
FIXME! TT 2023-10-18: Shouldn't the method then better be named defineSubsetOf()
?public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getInfo()
public void setInfo(java.lang.String $5)
public java.util.TreeMap getPairs()
public void setPairs(java.util.TreeMap $6)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.