Package com.io7m.smfj.processing.api
Class SMFAttributeArrayFloating2
- java.lang.Object
-
- com.io7m.smfj.processing.api.SMFAttributeArrayFloating2
-
- All Implemented Interfaces:
SMFAttributeArrayFloating2Type,SMFAttributeArrayType
public final class SMFAttributeArrayFloating2 extends java.lang.Object implements SMFAttributeArrayFloating2Type
The type of 2-element floating point arrays.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSMFAttributeArrayFloating2.BuilderBuilds instances of typeSMFAttributeArrayFloating2.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SMFAttributeArrayFloating2.Builderbuilder()Creates a builder forSMFAttributeArrayFloating2.static SMFAttributeArrayFloating2copyOf(SMFAttributeArrayFloating2Type instance)Creates an immutable copy of aSMFAttributeArrayFloating2Typevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofSMFAttributeArrayFloating2that have equal attribute values.inthashCode()Computes a hash code from attributes:values.static SMFAttributeArrayFloating2of(java.lang.Iterable<? extends com.io7m.jtensors.core.unparameterized.vectors.Vector2D> values)Construct a new immutableSMFAttributeArrayFloating2instance.static SMFAttributeArrayFloating2of(java.util.List<com.io7m.jtensors.core.unparameterized.vectors.Vector2D> values)Construct a new immutableSMFAttributeArrayFloating2instance.java.lang.StringtoString()Prints the immutable valueSMFAttributeArrayFloating2with attribute values.java.util.List<com.io7m.jtensors.core.unparameterized.vectors.Vector2D>values()SMFAttributeArrayFloating2withValues(com.io7m.jtensors.core.unparameterized.vectors.Vector2D... elements)Copy the current immutable object with elements that replace the content ofvalues.SMFAttributeArrayFloating2withValues(java.lang.Iterable<? extends com.io7m.jtensors.core.unparameterized.vectors.Vector2D> elements)Copy the current immutable object with elements that replace the content ofvalues.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.io7m.smfj.processing.api.SMFAttributeArrayFloating2Type
matchArray, size
-
-
-
-
Method Detail
-
values
public java.util.List<com.io7m.jtensors.core.unparameterized.vectors.Vector2D> values()
- Specified by:
valuesin interfaceSMFAttributeArrayFloating2Type- Returns:
- The array values
-
withValues
public final SMFAttributeArrayFloating2 withValues(com.io7m.jtensors.core.unparameterized.vectors.Vector2D... elements)
Copy the current immutable object with elements that replace the content ofvalues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withValues
public final SMFAttributeArrayFloating2 withValues(java.lang.Iterable<? extends com.io7m.jtensors.core.unparameterized.vectors.Vector2D> elements)
Copy the current immutable object with elements that replace the content ofvalues. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of values elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofSMFAttributeArrayFloating2that have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:values.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueSMFAttributeArrayFloating2with attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static SMFAttributeArrayFloating2 of(java.util.List<com.io7m.jtensors.core.unparameterized.vectors.Vector2D> values)
Construct a new immutableSMFAttributeArrayFloating2instance.- Parameters:
values- The value for thevaluesattribute- Returns:
- An immutable SMFAttributeArrayFloating2 instance
-
of
public static SMFAttributeArrayFloating2 of(java.lang.Iterable<? extends com.io7m.jtensors.core.unparameterized.vectors.Vector2D> values)
Construct a new immutableSMFAttributeArrayFloating2instance.- Parameters:
values- The value for thevaluesattribute- Returns:
- An immutable SMFAttributeArrayFloating2 instance
-
copyOf
public static SMFAttributeArrayFloating2 copyOf(SMFAttributeArrayFloating2Type instance)
Creates an immutable copy of aSMFAttributeArrayFloating2Typevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable SMFAttributeArrayFloating2 instance
-
builder
public static SMFAttributeArrayFloating2.Builder builder()
Creates a builder forSMFAttributeArrayFloating2.SMFAttributeArrayFloating2.builder() .addValues|addAllValues(com.io7m.jtensors.core.unparameterized.vectors.Vector2D) //valueselements .build();- Returns:
- A new SMFAttributeArrayFloating2 builder
-
-