Selfie
Loading...
Searching...
No Matches
selfie_lib.SnapshotValue.SnapshotValueString Class Reference
Inheritance diagram for selfie_lib.SnapshotValue.SnapshotValueString:
selfie_lib.SnapshotValue.SnapshotValue

Public Member Functions

 __init__ (self, str value)
 
bytes value_binary (self)
 
str value_string (self)
 
bool __eq__ (self, object other)
 
int __hash__ (self)
 
- Public Member Functions inherited from selfie_lib.SnapshotValue.SnapshotValue
bool is_binary (self)
 

Protected Attributes

 _value
 

Additional Inherited Members

- Static Public Member Functions inherited from selfie_lib.SnapshotValue.SnapshotValue
"SnapshotValue" of (Union[bytes, str, "SnapshotValue"] data)
 

Detailed Description

Definition at line 51 of file SnapshotValue.py.

Constructor & Destructor Documentation

◆ __init__()

selfie_lib.SnapshotValue.SnapshotValueString.__init__ (   self,
str  value 
)

Definition at line 52 of file SnapshotValue.py.

52 def __init__(self, value: str):
53 self._value = value
54

Member Function Documentation

◆ __eq__()

bool selfie_lib.SnapshotValue.SnapshotValueString.__eq__ (   self,
object  other 
)

Definition at line 61 of file SnapshotValue.py.

61 def __eq__(self, other: object) -> bool:
62 if isinstance(other, SnapshotValueString):
63 return self.value_string() == other.value_string()
64 return False
65

◆ __hash__()

int selfie_lib.SnapshotValue.SnapshotValueString.__hash__ (   self)

Definition at line 66 of file SnapshotValue.py.

66 def __hash__(self) -> int:
67 return hash(self._value)

◆ value_binary()

bytes selfie_lib.SnapshotValue.SnapshotValueString.value_binary (   self)

Reimplemented from selfie_lib.SnapshotValue.SnapshotValue.

Definition at line 55 of file SnapshotValue.py.

55 def value_binary(self) -> bytes:
56 raise NotImplementedError("This is a string value.")
57

◆ value_string()

str selfie_lib.SnapshotValue.SnapshotValueString.value_string (   self)

Reimplemented from selfie_lib.SnapshotValue.SnapshotValue.

Definition at line 58 of file SnapshotValue.py.

58 def value_string(self) -> str:
59 return self._value
60

Member Data Documentation

◆ _value

selfie_lib.SnapshotValue.SnapshotValueString._value
protected

Definition at line 53 of file SnapshotValue.py.


The documentation for this class was generated from the following file: