This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package netflix; | |
import com.typestruct.api.TypeStruct.Bind; | |
import com.typestruct.api.TypeStruct.Data; | |
import com.typestruct.api.TypeStruct.Data.Prototype; | |
import com.typestruct.bind.Field; | |
import com.typestruct.bind.struct.StructWord; | |
import com.typestruct.data.store.WordDataStore; | |
import example.type.DayIntervalType; //this is a "custom" user defined type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package netflix; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import com.typestruct.BaseException; | |
import com.typestruct.api.TypeStruct.Bind; | |
import com.typestruct.api.TypeStruct.Data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example.type; | |
import java.text.ParseException; | |
import java.util.Arrays; | |
import java.util.Date; | |
import java.util.concurrent.TimeUnit; | |
import com.typestruct.bind.BinBinding; | |
import com.typestruct.bind.BindingException; | |
import com.typestruct.bind.MemberBinding; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.typestruct.api; | |
import com.typestruct.api.TypeStruct.Bind; | |
import com.typestruct.api.TypeStruct.Bind.Modifier; | |
import com.typestruct.struct.StructDef; | |
import com.typestruct.struct.StructField; | |
/** | |
* Example Illustrating the definition of a multi-word <CODE>StructDef</CODE> containing: | |
* <UL> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.typestruct.api; | |
import com.typestruct.api.TypeStruct.Bind; | |
import com.typestruct.api.TypeStruct.Bind.Modifier; | |
import com.typestruct.struct.StructDef; | |
public class StructDefPrimitivesExample_NoComments { | |
static StructDef struct = TypeStruct.def("Struct Primitives", | |
Bind.byte8("byteField"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example.type; | |
import java.text.ParseException; | |
import java.util.Date; | |
import java.util.concurrent.TimeUnit; | |
import com.typestruct.bind.BaseBinBinding; | |
import com.typestruct.bind.BinBinding; | |
import com.typestruct.bind.BindingException; | |
import com.typestruct.bind.BindingRangeException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package netflix; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import com.typestruct.BaseException; | |
import com.typestruct.api.TypeStruct.Bind; | |
import com.typestruct.bind.Field; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gist.basics; | |
import com.typestruct.field.Bind; | |
import com.typestruct.frame.Frame; | |
import com.typestruct.frame.word.WordFrame; | |
/** | |
* Example illustrating the use of unsigned primitive field bindings | |
* (uByte8, uShort16, uInt32) within a <CODE>WordFrame</CODE> to store | |
* and mutate a "compound state" as a 64-bit long. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gist.basics; | |
import com.typestruct.field.Bind; | |
import com.typestruct.field.Bind.Modify; | |
import com.typestruct.frame.word.WordFrame; | |
/** | |
* Example illustrating the use of <B>Bucketizers</B> which | |
* are Type.Binding <B>Modifier</B>s applied to | |
* field bindings within a <CODE>WordFrame</CODE>. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gist.basics; | |
import com.typestruct.field.Bind; | |
import com.typestruct.frame.Frame.Field; | |
import com.typestruct.frame.word.WordFrame; | |
import com.typestruct.synthesize.Synthesize; | |
import com.typestruct.type.custom.DayInRangeType; //this is a "custom" user defined type | |
/** | |
* typestruct provides a simple API for representing, collecting, analyzing, and manipulating data in |
OlderNewer