Package ghidra.util.datastruct
Class FullKeySet
- java.lang.Object
- 
- ghidra.util.datastruct.FullKeySet
 
- 
- All Implemented Interfaces:
- ShortKeySet,- java.io.Serializable
 
 public class FullKeySet extends java.lang.Object implements ShortKeySet, java.io.Serializable Implementation of the ShortKeySet interface that always contains all the possible keys. Used to save storage when sets are full.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description FullKeySet(int numKeys)Construct a new FullKeySet
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(short key)Determines if a given key is in the set.shortgetFirst()Returns the first (lowest) key in the set.shortgetLast()Returns the last (highest) key in the set.shortgetNext(short key)finds the next key that is in the set that is greater than the given key.shortgetPrevious(short key)finds the previous key that is in the set that is less than the given key.booleanisEmpty()Checks if the set is empty.voidput(short key)Adds a key to the set.booleanremove(short key)Removes the key from the set.voidremoveAll()Removes all keys from the set.intsize()Returns the number of keys currently in the set.
 
- 
- 
- 
Method Detail- 
sizepublic int size() Returns the number of keys currently in the set.- Specified by:
- sizein interface- ShortKeySet
 
 - 
containsKeypublic boolean containsKey(short key) Description copied from interface:ShortKeySetDetermines if a given key is in the set.- Specified by:
- containsKeyin interface- ShortKeySet
- Parameters:
- key- the key whose presence is to be tested.
- Returns:
- true if the key is in the set.
- See Also:
- ShortKeySet.containsKey(short)
 
 - 
getFirstpublic short getFirst() Description copied from interface:ShortKeySetReturns the first (lowest) key in the set.- Specified by:
- getFirstin interface- ShortKeySet
- See Also:
- ShortKeySet.getFirst()
 
 - 
getLastpublic short getLast() Description copied from interface:ShortKeySetReturns the last (highest) key in the set.- Specified by:
- getLastin interface- ShortKeySet
- See Also:
- ShortKeySet.getLast()
 
 - 
putpublic void put(short key) Description copied from interface:ShortKeySetAdds a key to the set.- Specified by:
- putin interface- ShortKeySet
- Parameters:
- key- the key to add to the set.
- See Also:
- ShortKeySet.put(short)
 
 - 
removepublic boolean remove(short key) Description copied from interface:ShortKeySetRemoves the key from the set.- Specified by:
- removein interface- ShortKeySet
- Parameters:
- key- the key to remove from the set.
- See Also:
- ShortKeySet.remove(short)
 
 - 
removeAllpublic void removeAll() Description copied from interface:ShortKeySetRemoves all keys from the set.- Specified by:
- removeAllin interface- ShortKeySet
- See Also:
- ShortKeySet.removeAll()
 
 - 
getNextpublic short getNext(short key) Description copied from interface:ShortKeySetfinds the next key that is in the set that is greater than the given key.- Specified by:
- getNextin interface- ShortKeySet
- Parameters:
- key- the key for which to find the next key after.
- See Also:
- ShortKeySet.getNext(short)
 
 - 
getPreviouspublic short getPrevious(short key) Description copied from interface:ShortKeySetfinds the previous key that is in the set that is less than the given key.- Specified by:
- getPreviousin interface- ShortKeySet
- Parameters:
- key- the key for which to find the previous key.
- See Also:
- ShortKeySet.getPrevious(short)
 
 - 
isEmptypublic boolean isEmpty() Description copied from interface:ShortKeySetChecks if the set is empty.- Specified by:
- isEmptyin interface- ShortKeySet
- Returns:
- true if the set is empty.
- See Also:
- ShortKeySet.isEmpty()
 
 
- 
 
-