Package de.javagl.ply
Class ObjectPlyTarget.Handle<T>
- java.lang.Object
-
- de.javagl.ply.ObjectPlyTarget.Handle<T>
-
- Type Parameters:
T- The element type
- Enclosing class:
- ObjectPlyTarget
public static final class ObjectPlyTarget.Handle<T> extends Object
A handle for a specific type of element. An instance of this class is returned by theObjectPlyTarget.register(String, Supplier)method, and allows configuring the handling of individual properties of a certain element type.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsume(Consumer<? super T> consumer)Pass the elements to the given consumer when they are finished.<U extends Byte>
ObjectPlyTarget.Handle<T>withByte(String propertyName, BiConsumer<T,U> setter)Handle the specified property with the given setter.ObjectPlyTarget.Handle<T>withCharList(String propertyName, BiConsumer<T,byte[]> setter)Handle the specified property with the given setter.<U extends Double>
ObjectPlyTarget.Handle<T>withDouble(String propertyName, BiConsumer<T,U> setter)Handle the specified property with the given setter.ObjectPlyTarget.Handle<T>withDoubleList(String propertyName, BiConsumer<T,double[]> setter)Handle the specified property with the given setter.<U extends Float>
ObjectPlyTarget.Handle<T>withFloat(String propertyName, BiConsumer<T,U> setter)Handle the specified property with the given setter.ObjectPlyTarget.Handle<T>withFloatList(String propertyName, BiConsumer<T,float[]> setter)Handle the specified property with the given setter.<U extends Integer>
ObjectPlyTarget.Handle<T>withInt(String propertyName, BiConsumer<T,U> setter)Handle the specified property with the given setter.ObjectPlyTarget.Handle<T>withIntList(String propertyName, BiConsumer<T,int[]> setter)Handle the specified property with the given setter.<U extends Short>
ObjectPlyTarget.Handle<T>withShort(String propertyName, BiConsumer<T,U> setter)Handle the specified property with the given setter.ObjectPlyTarget.Handle<T>withShortList(String propertyName, BiConsumer<T,short[]> setter)Handle the specified property with the given setter.
-
-
-
Method Detail
-
withByte
public <U extends Byte> ObjectPlyTarget.Handle<T> withByte(String propertyName, BiConsumer<T,U> setter)
Handle the specified property with the given setter.- Type Parameters:
U- The value type- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
withShort
public <U extends Short> ObjectPlyTarget.Handle<T> withShort(String propertyName, BiConsumer<T,U> setter)
Handle the specified property with the given setter.- Type Parameters:
U- The value type- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
withInt
public <U extends Integer> ObjectPlyTarget.Handle<T> withInt(String propertyName, BiConsumer<T,U> setter)
Handle the specified property with the given setter.- Type Parameters:
U- The value type- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
withFloat
public <U extends Float> ObjectPlyTarget.Handle<T> withFloat(String propertyName, BiConsumer<T,U> setter)
Handle the specified property with the given setter.- Type Parameters:
U- The value type- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
withDouble
public <U extends Double> ObjectPlyTarget.Handle<T> withDouble(String propertyName, BiConsumer<T,U> setter)
Handle the specified property with the given setter.- Type Parameters:
U- The value type- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
withCharList
public ObjectPlyTarget.Handle<T> withCharList(String propertyName, BiConsumer<T,byte[]> setter)
Handle the specified property with the given setter.- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
withShortList
public ObjectPlyTarget.Handle<T> withShortList(String propertyName, BiConsumer<T,short[]> setter)
Handle the specified property with the given setter.- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
withIntList
public ObjectPlyTarget.Handle<T> withIntList(String propertyName, BiConsumer<T,int[]> setter)
Handle the specified property with the given setter.- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
withFloatList
public ObjectPlyTarget.Handle<T> withFloatList(String propertyName, BiConsumer<T,float[]> setter)
Handle the specified property with the given setter.- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
withDoubleList
public ObjectPlyTarget.Handle<T> withDoubleList(String propertyName, BiConsumer<T,double[]> setter)
Handle the specified property with the given setter.- Parameters:
propertyName- The property namesetter- The setter- Returns:
- This handle
-
-