Package eu.mihosoft.vmf.runtime.core
Interface Content
public interface Content
Content of this object graph. The content API of an object can be accessed via the
vmf()
method:
VObject o = ...
Content r = o.vmf().content()
-
Method Summary
Modifier and TypeMethodDescription<T> T
deepCopy()
Returns a deep copy of this object.boolean
Indicates whether this VMF object is equal to the specified model object.int
hashCode()
Returns the hash-code for this VMF object.iterator()
Returns an iterator that traverses the object graph (depth first) using theVIterator.IterationStrategy.UNIQUE_PROPERTY
iteration strategy.iterator
(VIterator.IterationStrategy strategy) Returns an iterator that traverses the object graph (depth first) using the specified iteration strategy.eu.mihosoft.vcollections.VList<VObject>
Deprecated.eu.mihosoft.vcollections.VList<VObject>
Deprecated.<T> T
Returns a shallow copy of this object.stream()
Returns a stream that contains all elements of the object graph (depth first) using theVIterator.IterationStrategy.UNIQUE_PROPERTY
iteration strategy.stream
(VIterator.IterationStrategy strategy) Returns a stream that contains all elements of the object graph (depth first) using the specified iteration strategy.Returns a stream that contains all elements of the object graph (depth first) that implement/extend the specified type.stream
(Class<T> type, VIterator.IterationStrategy strategy) Returns a stream that contains all elements of the object graph (depth first) that implement/extend the specified type.
-
Method Details
-
iterator
VIterator iterator()Returns an iterator that traverses the object graph (depth first) using theVIterator.IterationStrategy.UNIQUE_PROPERTY
iteration strategy.- Returns:
- an iterator that traverses the object graph
-
iterator
Returns an iterator that traverses the object graph (depth first) using the specified iteration strategy.- Parameters:
strategy
- iteration strategy- Returns:
- an iterator that traverses the object graph
-
stream
Returns a stream that contains all elements of the object graph (depth first) using theVIterator.IterationStrategy.UNIQUE_PROPERTY
iteration strategy.- Returns:
- a stream that contains all elements of the object graph
-
stream
Returns a stream that contains all elements of the object graph (depth first) using the specified iteration strategy.- Parameters:
strategy
- iteration strategy- Returns:
- a stream that contains all elements of the object graph
-
stream
Returns a stream that contains all elements of the object graph (depth first) that implement/extend the specified type. It maps all elements to the specified type, i.e. returnsStream<T>
.- Type Parameters:
T
- element type- Parameters:
type
- type for filtering and mapping- Returns:
- a stream of type
, i.e. Stream<T>
-
stream
Returns a stream that contains all elements of the object graph (depth first) that implement/extend the specified type. It maps all elements to the specified type, i.e. returnsStream<T>
using the specified iteration strategy.- Type Parameters:
T
- element type- Parameters:
type
- type for filtering and mappingstrategy
- iteration strategy- Returns:
- a stream of type
, i.e. Stream<T>
-
referencedBy
Deprecated.Returns an unmodifiable list of all objects that reference this object.- Returns:
- an unmodifiable list of all objects that reference this object
-
references
Deprecated.Returns an unmodifiable list of all objects that are referenced by this object.- Returns:
- an unmodifiable list of all objects that are referenced by this object.
-
deepCopy
<T> T deepCopy()Returns a deep copy of this object.- Returns:
- a deep copy of this object
-
shallowCopy
<T> T shallowCopy()Returns a shallow copy of this object.- Returns:
- a shallow copy of this object
-
equals
Indicates whether this VMF object is equal to the specified model object. It uses VMFs equals implementation which compares all properties unless they are ignored explicitly via annotation.Example:
MyModel m1 = ... MyModel m2 = ... boolean equals = m1.vmf().content().equals(m2); System.out.println("Models are equal: " + equals); // output: Models are equal: true
-
hashCode
int hashCode()Returns the hash-code for this VMF object. It uses VMFs hashCode implementation which takes all properties into account unless they are ignored explicitly via annotation.
-