Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Containser ¶
type Containser interface {
Contains(x Element) bool // Contains returns true iff x is an element of this parent, or can naturally be regarded as an element of this parent.
}
Containser is the interface satisfied by the Contains method.
type Element ¶
type Element interface { fmt.Stringer hash.Hasher Parent() Parent // Parent returns the parent of this object. }
Element is the interface satisfied by an object that belongs to a Parent.
func SliceToElementSlice ¶
SliceToElementSlice copies the entries of the given slice S, all of which are assumed to satisfy the Element interface, into a new slice of Elements. The new slice will have the same capacity as S. This will return an error if S is not a slice, or if the entries of S do not satisfy the Element interface.
type Parent ¶
type Parent interface { fmt.Stringer Containser ToElement(x Element) (Element, error) // ToElement returns x as an element of this parent, or an error if x cannot naturally be regarded as an element of this parent. AreEqual(x Element, y Element) (bool, error) // AreEqual returns true iff x and y are both contained in the parent, and x = y. }
Parent is the interface satisfied by an object that has child Elements.
Click to show internal directories.
Click to hide internal directories.